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: function prototypes
Date Tue, 31 Dec 1996 23:38:30 GMT
On Tue, 31 Dec 1996, Rob Hartill wrote:

[prototype in http_protocol.h for basic_http_header]

> I noticed this was missing for mod_perl.

It's not missing. Nothing outside of http_protocol.c should use it. If
mod_perl does, it's broken.

If a module uses basic_http_header(), it is in serious danger of
breaking things. For example, if a module does this (and I haven't
looked precisely at mod_perl):

/* We don't want any "extra" headers, just the basics */
basic_http_header();
rprintf("\015\012");
send_my_body();

Under HTTP/1.0, this would work fine. However, with HTTP/1.1, this
breaks: if a HTTP/1.1 client shows up, and gets this response, it will
assume that it is a presistent connection (since it lacks a
Connection: close), and things could get messed up (practically, they
probably wouldn't, since Apache would likely close the connection
afterwards). There are other examples, and other protocols (HTTP/1.2,
for example), might prove worse in this regard.

Now, I must admit that I don't know under what circumstances mod_perl
uses basic_http_header, but IMO, it should remain a private function
of http_protocol.c (should probably be static).

-- 
________________________________________________________________________
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