httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@nueva.pvt.k12.ca.us>
Subject Re: WWW Form Bug Report: "Keep-Alive Request for NEXT version. Please!!!!!" on BSDI (fwd)
Date Thu, 19 Dec 1996 03:15:30 GMT
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
--

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).

-- 
________________________________________________________________________
Alexei Kosut <akosut@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Mime
View raw message