Re: Serving Images via FastCGI

Chris Lightfoot <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <fsZtkKDSfFJ1.TfmrVBXlK/[email protected]>
On Tue, Jan 30, 2007 at 07:51:02PM -0500, Simon wrote:
> 
> No, the script does not send content-length, although the image is static. I cannot
> change the application,  only its running environment. Would sending content-length
> somehow alter FastCGI's behaviour?

if the server doesn't send the client some indication of
the length of the response, it's impossible to use
keepalive connections (the client wouldn't be able to
distinguish the headers of the next response from the end
of the current one). so either sending a content-length
header or using the chunked transfer-encoding is a
precondition for keepalives. however, the server may be
able to impose chunked TE even if the FastCGI server
doesn't send data in that format; that depends on the
client being HTTP/1.1. usually best to send content-length
if you can. it should be a trivial patch to the
application to make it send a content-length if it's
reading the image files from disk.

-- 
``Outside of a dog, a book is a man's best friend.
  Inside of a dog, it's too dark to read.'' (Groucho Marx)
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.