[fwd] Re: Returning image/gif Content-type

Stanley Gambarin (gambarin@OpenMarket.com)
Fri, 07 Feb 1997 17:11:51 -0500

Message-Id: <199702072211.RAA00675@u4-138.openmarket.com>
To: fastcgi-developers@OpenMarket.com
Subject: [fwd] Re: Returning image/gif Content-type
Date: Fri, 07 Feb 1997 17:11:51 -0500
From: Stanley Gambarin <gambarin@OpenMarket.com>


------- Forwarded Message

Message-Id: <32FAD0D1.608E@netsinc.com>
Date: Fri, 07 Feb 1997 01:50:58 -0500
From: Rujith de Silva <desilva@netsinc.com>
Reply-To: desilva@netsinc.com
Organization: Nets, Inc.
X-Mailer: Mozilla 3.01Gold (Win95; I)
MIME-Version: 1.0
To: sandy@dmcsoft.com
CC: fastcgi-developers@OpenMarket.com
Subject: Re: Returning image/gif Content-type
References: <32F9A4A8.1C3@dmcsoft.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> I was trying to write a little fcgi app last night which returned a gif
> created on the fly using the gd library. I figured that I'd just need to
> put out a content type header of image/gif, then write the gif to
> stdout. However, this doesn't seem to have worked - the error logs on
> the web server suggest a malformed content type header.

Did you remember to recompile gd using the fcgi .h files and libs? 
Otherwise, gd would just write to stdout, which is the WRONG thing to
do, because fcgi works by intercepting writes to stdout.

Is the app written in C, or in Perl using GD.pm?  There is another
problem with using GD.pm with fcgi that is more difficult to solve, but
you shouldn't have a problem with combining gd and fcgi in C.

Later,
Rujith.



------- End of Forwarded Message