Re: Returning image/gif Content-type

Bill Snapper (snapper@OpenMarket.com)
Thu, 06 Feb 1997 12:13:41 -0500

Message-Id: <32FA1145.2704@openmarket.com>
Date: Thu, 06 Feb 1997 12:13:41 -0500
From: Bill Snapper <snapper@OpenMarket.com>
To: Ron Klatchko <ron@narrowline.com>
Subject: Re: Returning image/gif Content-type

If I understand what is being attempted here, the problem is not in 
writing to stdout.  The problem is that a FastCGI application writing
to stdout does not go to stdout as you are used to.  The FastCGI library
will multplex data over a socket between a Web Server and a FastCGI
application.  This includes stdin, stdout, and stderr.  Therefore an
application which writes to standard output which is not linked against
the FastCGI library or compiled with the FastCGI header files will not
put the data to the correct location.

I saw a posting from someone that suggested piping the output from the
application to a file and then sending the file.  This will work.  You
could also structure your application so that it took data directly from
the newly exec'd application's stdout and then forward it on to the
FastCGI application's standard outout.

Hope this helps clear things up.

- Bill -

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bill Snapper           | Open Market, Inc.   | My opinions are my own,
Software Engineer      | 245 First St.       | and not necessarily
snapper@openmarket.com | Cambridge, MA 02142 | those of my employer, 
1-617-949-7365         |                     | Open Market Inc.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++