httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.com>
Subject Re: WWW Form Bug Report: "Keep-Alive Request for NEXT version. Please!!!!!" on BSDI (fwd)
Date Fri, 20 Dec 1996 20:15:17 GMT

---------- Forwarded message ----------
Date: Thu, 19 Dec 1996 11:16:35 -0500 (EST)
From: Michael Best <mbest@com.org>
To: Alexei Kosut <akosut@nueva.pvt.k12.ca.us>
Cc: new-httpd@hyperreal.com
Subject: Re: WWW Form Bug Report: "Keep-Alive Request for NEXT version.  Please!!!!!" on BSDI
(fwd)

On Wed, 18 Dec 1996, Alexei Kosut wrote:

> On Wed, 18 Dec 1996, Rob Hartill wrote:
> 
> > This is not a bug and I don't see anywhere for
> > requests, but this is very important to my site
> > which uses CGI scripts exclusively.  I need to be
> > able to use "Keep-Alive" when using a script.  For
> > example, if I return a redirect using "Location:",
> > I would like Apache to use "Keep-Alive."  It would
> > be also be useful on other pages returned from the
> > script.
> > 
> > PLEASE RESPOND!  I got no answer from my
> > last message to you about this.
> 
> It is possible for a CGI script to use Keep-Alive, as long as it
> generates its own response body, and includes a Content-length
> header. In other words, instead of just returning:
> 
> --
> Location: wherever
> 
> --
> 
> You'd have to return
> 
> --
> Status: 302 Moved
> Location: wherever
> Content-length: length of "some message"
> Content-type: text/html
> 
> some message
> --

I tried writing a small script that did this:

main()
{
printf("Status: 200 OK\n");
printf("Content-type: text/html\n");
printf("Content-length: 6\n\n");
printf("hello\n");
}

But the server did not use Keep-Alive.  The server we are using is
Apache/1.1.1.  It does use Keep-Alive if you request an html document.  Is
there a setting somewhere that needs to be set, since you say this should
work.

 
> Similarly with normal responses, you have to include a Content-length
> response header containing the exact number of bytes in the response
> body (everything after the headers and the newline ending it).
> 
> Also, Apache 1.2 will always use Keep-Alive for CGI scripts, when a
> HTTP/1.1 browser makes a request (HTTP/1.0 browsers will continue to
> be subjected to the above logic).

What browsers are HTTP/1.1?  What's the difference?

-- Michael Best




Mime
View raw message