Received: (qmail 60044 invoked by uid 65534); 26 Mar 2000 18:30:51 -0000 Message-Id: <20000326183051.60043.qmail@locus.apache.org> Date: 26 Mar 2000 18:30:51 -0000 From: Dirk Schanz Reply-To: Dirk.Schanz@ovb.net To: submit@bugz.apache.org Subject: CRLF translation on stdout when executing cgi-script X-Send-Pr-Version: 3.110 >Number: 5930 >Category: mod_cgi >Synopsis: CRLF translation on stdout when executing cgi-script >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: mistaken >Submitter-Id: apache >Arrival-Date: Sun Mar 26 10:40:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Dirk.Schanz@ovb.net >Release: actual >Organization: apache >Environment: WIN NT 4.0 ServicePack 5, downloaded binary >Description: I had some trouble with a cgi program ( written in C ). This cgi simply opens a binary file and writes its contents to stdout. Unfortunateley all CR in the stream have been translated into CRLF. >How-To-Repeat: Simply open a binary ( e.g. gif file ) and write the contents to stdout. >Fix: It's easy to workaround - do a setmode( _fileno(stdout), O_BINARY ) before sending. But why is this not the default setting for cgi-output? I would never expect translated text (CR->CRLF) as a result of a cgi executable. >Release-Note: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]