2 ms·
This was running on Linux? That's odd. The bug works on Python. Wondering how Perl does the formatting to end up with \r\n. Either way, still puzzling there i
by user5994461 7y ago
This was running on Linux?
That's odd. The bug works on Python. Wondering how Perl does the formatting to end up with \r\n.
Either way, still puzzling there is a typo in the official example.
- lazyjones 7y agoYou can find similar examples with just \n in the official Apache docs on CGI: https://httpd.apache.org/docs/2.4/howto/cgi.html https://httpd.apache.org/docs/2.4/howto/cgi.html The solution for this puzzle is that mod_cgi will simply convert LF to CRLF silently. (more precisely: it parses the headers the script outputs in a relaxed way and lets the server write them in a correct format later)
- GlitchMr 7y agoThis is directly executed (without HTTP server involved, yes, it's possible to run CGI programs directly in shell) program on Linux.