httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@imdb.com (Rob Hartill)
Subject Re: function prototypes
Date Wed, 01 Jan 1997 01:21:42 GMT
Alexei Kosut wrote:

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

mod_perl's not your average kind of module, it's more like an extension
of the server.

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

Here's what a mod_perl request spits out from my Perl code. All I did was
ask for a "200" status.

HTTP/1.1 200 OK
Date: Wed, 01 Jan 1997 00:26:51 GMT
Server: Apache/1.2b5-dev mod_perl/0.90
Connection: close
Content-Type: text/html

I don't think this is any different that CGI which this example is equivalent
to.

My crystal ball shows mod_perl being bundled as standard with Apache 2.0.
I predict big things for mod_perl once perl5.004/mod_perl_1.0/Apache_1.2
get released (real soon now for all 3). I've been toying with the idea
of rewriting some of the existing modules in Perl.. it's the ultimate in
server customisation.

In the world of HTTP servers, if Apache is the best thing since sliced
bread then mod_perl implements the sandwich  :-)

if mod_perl bends an API rule it's probably a sign that the API is broken :-)

rob

Mime
View raw message