X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/7ea184756f86253c9df662ae7ab3ece1a8508b31..dd83f6d8663d721cc00dc81692c6230688412075:/doc/bugs/CGI_showed_HTML_when_perl_error.mdwn diff --git a/doc/bugs/CGI_showed_HTML_when_perl_error.mdwn b/doc/bugs/CGI_showed_HTML_when_perl_error.mdwn index 1cb9b94bc..b222b297d 100644 --- a/doc/bugs/CGI_showed_HTML_when_perl_error.mdwn +++ b/doc/bugs/CGI_showed_HTML_when_perl_error.mdwn @@ -1,4 +1,8 @@ -I didn't have Time/Duration.pm installed when I clicked RecentChanges. The perl failed. The CGI outputed the Content-type: text/html and the complete HTML which included the error in side of the paragraph tags. Maybe a newline was sent before that Content-type line. The web browser didn't render the HTML but just showed the source. +I didn't have Time/Duration.pm installed when I clicked RecentChanges. The +perl failed. The CGI outputed the Content-type: text/html and the complete +HTML which included the error in side of the paragraph tags. Maybe a newline +was sent before that Content-type line. The web browser didn't render the HTML +but just showed the source. > I can't reproduce this, I get a properly formatted error page. > If you'd like to send me the page, I can try to figure out what @@ -18,3 +22,19 @@ I didn't have Time/Duration.pm installed when I clicked RecentChanges. The perl >> >> --JeremyReed +Here's what I see, taking the web server out of the picture: + + joey@kodama:~>~/html/ikiwiki.cgi 2>/dev/null |hexdump -C|head -1 + 00000000 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 74 65 |Content-type: te| + +No spurious 0a. With apache: + + 0100 75 6e 6b 65 64 0d 0a 43 6f 6e 74 65 6e 74 2d 54 unked..C ontent-T + +Here the 0d 0a is a CRLF, and note that it's output by the web server, not +ikiwiki. It's perfectly valid, while a lone 0a, just a linefeed, is not valid +HTTP. Conclusion, this was your web server; it's not uncommon for hacky +little web servers to not use proper CRLF's, and it works _some_ of the time, +depending on how strict the browser is. + +I'm calling this [[bugs/done]] --[[Joey]]