httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject Re: what to do about CGI and chunked
Date Mon, 25 Nov 1996 06:45:32 GMT
>> is complete and correct, and killing keepalive if it isn't (since
>> otherwise the server would interpret the leftover garbage as a
>> second request and send a second error response after the CGI response).
>> Normal CGI scripts are not affected by the changes (other than the bug fixes).
> 
> Well, if I recall correctly, error messages kill keepalive anyhow,
> so...

That assumes the CGI script would send an error message.  The ones I tested
did not.

> 1) The calling module really shouldn't set anything in the request
> directly. This is, IMHO, just a bad idea. The read_body thing should
> be an argument to setup_client_block.

grump... that's how I had it at first, but switched so as not to disrupt
the existing call interface.  I'll switch back.

> 2) It's not neccessary to set anything to 0 in the request_rec
> structure - it's done when its initialized.

That is a style issue.

> 3) "Assumes that caller will never pass a bufsiz <= 2". Nope, no can
> do. An earlier version of get_client_block did assume this, and it
> ran into a big problem with mod_fastcgi, which can actually send a
> buffer size of 1. One-byte reads are perfectly acceptable. If the
> module programmer wants to shoot themselves in the foot, at least
> don't do it for them... (although we certainly can assume bufsiz is >=
> 1).

I'll look into it.  Off-hand, the only way to support a 1 char buffer
with the REQUEST_CHUNKED_PASS option is to push the extra character
back onto the input BUFF.

.....Roy

Mime
View raw message