>Number: 1244 >Category: os-windows >Synopsis: mod_cgi talks to CGI programs in TEXT mode >Confidential: no >Severity: serious >Priority: medium >Responsible: >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Oct 17 12:10:00 PDT 1997 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3b2 >Environment: Windows NT 4.0, MSVC++ 5.0, >Description: CGI module is opening pipe to subprocess in text mode. This makes it hard to have CGI programs which parse arbitrary binary data.
"Text mode" is one of those horrible characteristics of the runtime library on Windows, and IMHO, should be avoided. >How-To-Repeat: Make a dummy CGI program that reads in the raw info (quantity specifed in content length.) Then write an http client that posts binary data, and make sure the binary data includes a newline (0x0a) character. The CGI will see the newline substituted with CR LF (0x0d, 0x0a) >Fix: I'm working on a fix, but I'm not super-expert on Apache code, so I don't know what else it might break. I'm trying to simple change the pipe that is created to be opened _O_BINARY instead of _O_TEXT. %0 >Audit-Trail: >Unformatted:
