#13319 closed defect (fixed)
Server error: malformed header
Reported by: | ntmlod | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracFormsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
When I noticed that the HTML escape sequences weren't interpreted in field default content, I upgraded to the trunk.
I got my usual tag
importing problem
-
tracforms/api.py
9 9 from trac.resource import IResourceManager, ResourceNotFound, \ 10 10 get_resource_name, get_resource_shortname, \ 11 11 get_resource_url 12 from trac.util.html import tag12 from trac.util.html import html as tag 13 13 from trac.util.translation import domain_functions 14 14 from trac.web import IRequestHandler 15 15 from trac.web.api import HTTPBadRequest -
tracforms/util.py
7 7 import codecs 8 8 9 9 from trac.resource import ResourceSystem 10 from trac.util.html import tag10 from trac.util.html import html as tag 11 11 from trac.util.text import to_unicode 12 12 13 13 from api import tag_ -
tracforms/web_ui.py
8 8 get_resource_shortname, get_resource_url 9 9 from trac.search.api import ISearchSource, shorten_result 10 10 from trac.util.datefmt import to_datetime 11 from trac.util.html import tag11 from trac.util.html import html as tag 12 12 from trac.web.api import IRequestFilter, IRequestHandler 13 13 from trac.web.chrome import ITemplateProvider, add_ctxtnav, add_stylesheet 14 14
Then I reloaded my page with forms and got a server crash: malformed header from script 'trac.cgi': Bad header: (('wiki', u'PageTemplates/Work
The page name is not good as it missed the remainder of the name ('WorkPlanAction').
I remember having a similar server issue with WorkflowActionButtonsPlugin #12960 but after review it's probably not related at all.
Attachments (0)
Change History (24)
comment:1 Changed 7 years ago by
comment:4 Changed 7 years ago by
Yes, r16946 simply contains your Trac < 1.0.2 compatibility fix in comment:description.
comment:5 Changed 7 years ago by
Oh my bad I looked at the wrong changeset, with so many differences I thought it contains other stuff besides my small contribution.
comment:8 Changed 7 years ago by
Not really, the same crash for the server and no additional warning in the log.
comment:10 Changed 7 years ago by
You might get more information in the log after r16958. Otherwise, I'll need to see markup that reproduces the issue.
comment:11 Changed 7 years ago by
Owner: | set to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:12 follow-up: 13 Changed 7 years ago by
This issue definitely doesn't want to be traced.
For the rest of it, do you mean having the code of the page with ?hdfdump=1
comment:13 Changed 7 years ago by
Replying to ntmlod:
For the rest of it, do you mean having the code of the page with
?hdfdump=1
I need to see example of wiki markup that results in the error.
comment:14 Changed 7 years ago by
I have redacted most of the content while trying to keep the structure used with special syntax.
In particular, my wiki template form is combined with ParametrizedTemplatesPlugin and ExtractUrlPlugin
= \'\'\'\'\'{{Xxxxxx, Xxxxx, text, xxxxxxxxxxxxxxxx}}\'\'\'\'\'\r\n\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n== xxxx\r\n\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[[span(XXXX, style=background-color:lightgrey)]], [[span(Xxxxxxxxxx, style =background-color:lightblue)]] and [[span(Xxxxxxxx, style=background- color:lightgreen)]].\\\\\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n== Xxxxxxxxx #xxxxxx\r\n\r\n||= \'\'\'Xxxxxx\'\'\' =|| {{xxxxxx, Xxxxxx, text, xxxxxxxxxxxxxxxx}} ||\r\n||= \'\'\'XXX\'\'\' =|| {{XXX, Xxxxxxxxxx, text, Xxxxxx}} ||\r\n{{{#!th\r\n\r\n\'\'\'Xxxxx\'\'\'\r\n\r\n}}}\r\n{{{#!td\r\n\r\n{{xxxxx, Xxxxxx, textarea, Xxxxxxxxxxxxxxxxxxxxxx}}\r\n\r\n}}}\r\n|-\r\n ||\r\n||= \'\'\'Xxxxxx\'\'\' =|| #0000 ||\r\n||= \'\'\'Xxxxxxx\'\'\' =|| [source:/branches/.....] ||\r\n||= \'\'\'Xxxxx\'\'\' =|| [[ExtractUrl(.)]] ||\r\n\r\n{{{#!comment\r\n\r\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\n\r\n}}}\r\n== ==\r\n{{{#!comment\r\n\r\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx\r\n\r\n}}}\r\n\r\n{{{#!Fold title=Xxxxxx tag=h2\r\n[=#xxxxxxx]\r\n\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n{{{#!TracForm\r\n#!subcontext xxxxxxx\r\n#!submit_label \'Save Xxxxxxxxx\'\r\n#!keep_history yes\r\n\r\n=== Xxxxxxxxxx\r\n\r\n [tf.textarea:xxxxxxx -id=xxxx -class=xxxx \'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\' 0 20]...........................................................\r\n\r\n\'\'\'\'\'Updated on [tf.form_updated_on:] by [tf.form_updater:]\'\'\'\'\'\r\n\r\n}}}\r\n\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n}}}\r\n\r\n{{{#!Fold title=Xxxxxxx tag=h2\r\n[=#xxxxxx]\r\n\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n{{{#!TracForm\r\n#!subcontext xxxxxx_\r\n#!submit_label \'Save Xxxxxx\'\r\n\r\n||= Xxxxxxxx =||= Xxxxxxx =||= Xxxxxx =||\r\n|| Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx || [tf.select:2.1 -id=xxxxxx \'\' Yes No NR] || [tf.textarea:x.x -id=xxxxxx \'Xxxxxxxxxx\' 50 10] ||\r\n||.................................................................\r\n\r\n\'\'\'\'\'Updated on [tf.form_updated_on:] by [tf.form_updater:]\'\'\'\'\'\r\n\r\n}}}\r\n\r\n
comment:15 Changed 7 years ago by
I'm not sure what that is, I guess it's the redacted content copied from the output of hdfdump
.
If you want me to debug this you will need to generate a minimal example of wiki markup that I can paste into a wiki page to reproduce the issue. That is, the content that is placed between the opening and closing brackets of a WikiProcessor calls: {{{#!TracForm
and }}}
.
comment:16 Changed 7 years ago by
The fact is the page has multiple calls of TracForms WikiProcessors, 4 to be specific, and I'm not very comfortable to paste all this stuff here.
Could I send it to you by email ?
comment:17 follow-up: 18 Changed 7 years ago by
I was hoping you could provide a minimal example of the call to reproduce the issue. For example, create a test page and start adding form content until the issue is reproduced. Can you experiment a bit to try and provide that minimal example?
comment:18 Changed 7 years ago by
Replying to Ryan J Ollos:
I was hoping you could provide a minimal example of the call to reproduce the issue. For example, create a test page and start adding form content until the issue is reproduced. Can you experiment a bit to try and provide that minimal example?
Sure, I was a bit lazy on this.
After few tests with my template I come to the conclusion that's the wiki content doesn't seem to be involved here.
All templates edited by removing one by one each TracForms section crashed when switching to 0.5dev, finally I create a page with solely a void form with the same outcome.
comment:19 follow-up: 20 Changed 7 years ago by
To be sure, the page consists of:
{{{#!TracForm }}}
and nothing else? Is the error message the same as in comment:description?
TracFormMacro
has a few debug statements: tracformsplugin/trunk/tracforms/macros.py@16958:141-142,145-146,168,173#L136 Could you see what is logged at debug level when loading the page with your empty WikiProcessor call?
comment:20 Changed 7 years ago by
Replying to Ryan J Ollos:
To be sure, the page consists of:
{{{#!TracForm }}}and nothing else? Is the error message the same as in comment:description?
Exactly, nothing in TracForm Processor and I get the same error malformed header from script 'trac.cgi': Bad header: (('wiki', u'...
TracFormMacro
has a few debug statements: tracformsplugin/trunk/tracforms/macros.py@16958:141-142,145-146,168,173#L136 Could you see what is logged at debug level when loading the page with your empty WikiProcessor call?
2017-11-06 23:39:37,874 Trac[formatter] DEBUG: Executing Wiki macro TracForm by provider <tracforms.macros.TracFormMacro object at 0x4c1c550> 2017-11-06 23:39:37,874 Trac[macros] DEBUG: TracForms state = 2017-11-06 23:39:37,875 Trac[macros] DEBUG: TRACFORM_PARSER_OUT: 2017-11-06 23:39:37,875 Trac[macros] DEBUG: TracForms parsing finished
comment:23 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Bravo ! It was a tricky one.
comment:24 Changed 7 years ago by
Well, I should be more careful with my commits and stop trying to do multiple things at once! Thanks for your effort to debug the issue.
I forgot to add that's the logging of the crash doesn't raise any unexpected events.