#7695 closed defect (fixed)
Submit results in `AssertionError: Response already started`
Reported by: | Owned by: | Steffen Hoffmann | |
---|---|---|---|
Priority: | high | Component: | TracFormsPlugin |
Severity: | blocker | Keywords: | HTTP header missing |
Cc: | manolowolder, j.beilicke@…, Ryan J Ollos | Trac Release: | 0.12 |
Description (last modified by )
This may be an installation issue, but not seeing anything amiss. I followed steps to install the plugin. When i attempt to use the laundry list example, i'm seeing this error:
Trac detected an internal error: AssertionError: Response already started
It seems to have taken the update, but what is this error? this was usingtracformsplugin-r8671
Thank you, Sue
Attachments (1)
Change History (11)
comment:1 Changed 14 years ago by
Cc: | manolowolder added; anonymous removed |
---|
comment:2 Changed 14 years ago by
Cc: | j.beilicke@… added |
---|
I can confirm comment comment:1. The same happens on my machine (Trac 0.12). After adding a demo form to a ticket without using [[Include(...)]]
(IncludeMacro), I get:
Trac detected an internal error: RuntimeError: No Content-Length header set
When going back to the ticket using the browser history and clicking the update button of the form, the AssertionError
occurs.
When I include a template form of a wiki page, I only get the AssertionError
.
comment:3 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Summary: | tracforms submit for example not working → Submit results in `AssertionError: Response already started` |
Changed 14 years ago by
Attachment: | fx_7695.patch added |
---|
a quick fix like what had been done by Mikko Rantalainen for TimeVisualizerPlugin before
comment:4 Changed 14 years ago by
Keywords: | HTTP header missing added |
---|
After some research I found, that Trac 0.12 uses stricter HTTP request handling now.
Requiring a valid Content-Length
header has been an issue for other plugins before. I recognized this for TimeVisualizerPlugin and later for AutocompleteUsersPlugin (with a different fix).
Please check proposed change. Hint: notice especially the added length statements in there.
I'll commit that to trunk
branch ASAP, provided I'll receive requested privileges.
comment:5 Changed 14 years ago by
Priority: | normal → high |
---|---|
Severity: | normal → blocker |
Trac Release: | 0.11 → 0.12 |
Giving higher priority now, because with Trac 0.12 this is a real show-stopper.
Changeset with fix tested and verified is prepared here.
comment:6 Changed 14 years ago by
Cc: | Ryan J Ollos added |
---|
comment:7 Changed 14 years ago by
Owner: | changed from Rich Harkins to Steffen Hoffmann |
---|
Ok, got a 'GO' and will do it now.
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [9580]) TracFormsPlugin: Adapt to stricter HTTP request handling in Trac >= 0.12, closes #7695.
Fixed RuntimeError: No Content-Length header set
similar to work on #7442
done by Mikko Rantalainen for TimeVisualizerPlugin.
comment:9 follow-up: 10 Changed 14 years ago by
Looking at line 55 in the commit, is it not case sensitive to 'Content-type' vs. 'Content-Type' ... or is there something else going on here that I don't understand?
comment:10 Changed 14 years ago by
Replying to rjollos:
Looking at line 55 in the commit, is it not case sensitive to 'Content-type' vs. 'Content-Type' ... or is there something else going on here that I don't understand?
No, certainly not, must have been only me copying from mentioned changeset done by insyte and Mikko. The fix is essentially calculating and adding the missing «Content-Length» header.
I've seen another fix, that doesn't need an explicit calculation, but don't remember now, where to look. I'll announce, if/when I find it, since it looked more elegant to me IIRC.
I have the same problem, it started to reproduce after upgrading from TRAC 0.11 to TRAC 0.12.
The issue reproduces when you change values in a form and hit the submit button.
After the error "AssertionError: Response already started", refreshing the page/ticket shows that the new values have been updated in the form.
I have tried TracFormsPlugin 0.2.1 and 0.3 with the same issue.
TRAC 0.11 and TracFormsPlugin 0.2.1 worked ok before the upgrade.