You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Peter Tillemans <pt...@net4all.be> on 1997/11/11 01:30:46 UTC

general/1389: No binary IO possible with cgi scripts

>Number:         1389
>Category:       general
>Synopsis:       No binary IO possible with cgi scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Nov 10 16:40:00 PST 1997
>Last-Modified:
>Originator:     pti@net4all.be
>Organization:
apache
>Release:        1.3b2
>Environment:
NT4SP3, VC++5, perl5.00404, mod_perl-1.05
>Description:
Creating GIF in a CGI script results in garbage output. Same script run from mod_perl or another web server gives Ok result.
>How-To-Repeat:
Install GD library for perl. Hack one of the examples to print its result to stdout. If interested, contact me, I send you an example script. However, any other binary interaction should do : gzip-ing something, copying  a graphic whatever
>Fix:
replace line 1221 of ../src/main/alloc.c from
#define enc_pipe(fds) _pipe(fds, 512, O_TEXT | O_NOINHERIT)
to
#define enc_pipe(fds) _pipe(fds, 512, O_BINARY | O_NOINHERIT)
%0
>Audit-Trail:
>Unformatted: