[Home]WikiBugs/ChunkedModeTransferNotCompliant

UseModWiki | WikiBugs | RecentChanges | Preferences

The response to a POST of page edit (wiki.pl?action=edit) returns a redirect (302) code and an entity body in "chunked-mode"; however, it fails to include the 0 sized final chunk.

For example, it sends:


HTTP/1.1 302 Moved
Date: Mon, 16 Dec 2002 18:25:39 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux mod_ssl/2.8.9 OpenSSL/0.9.6g PHP/4.1.2
location: http://annie.lsli.com:8080/cgi-bin/wiki.pl?NewNodeSG
Keep-Alive: timeout=15, max=91
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/x-perl

9e 

Your browser should go to the NewNodeSG page. If it does not, click <a
href="http://annie.lsli.com:8080/cgi-bin/wiki.pl?NewNodeSG">NewNodeSG</a> to continue.

The '9e' length is correct, but the cbunked encoding protocol requires another two lines:
0


so that the browser or other agent knows that the message is complete.

See RFC 2616 for details. BTW, this is not (IMO) nit-picky carping; I only noticed this because it broke a HTTP tunnel I'm working on. I can work around this in my code (because it *should* deal with broken servers), but still...

As a side note, the entity should actually be a complete HTML page, and the Content-Type should be "text/html", as the point of it is to display a page in the browser if the redirect fails.

Thanks, Steve Greenland (steveg at lsli.com)


Thank you for the report. I don't know what I can do about this, however, since UseModWiki does not set the Transfer-Encoding header. The default behavior is to simply use the CGI.pm "redir" method. I prefer to use CGI.pm as much as possible since the maintainers of that package are more likely to keep up with HTTP/HTML standards than I am.

If you set config variable $RedirType to 2 the script will print its own redirection page (of type text/html). (If you set $RedirType to 3, the script will display an ordinary page (not a redirection) with a link to the edited page.) --CliffordAdams


UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited April 9, 2009 5:39 pm by GunnarH (diff)
Search: