httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache/src/nt mod_isapi.c modules.c
Date Tue, 22 Jul 1997 22:15:56 GMT
Alexei Kosut wrote:
> 
> On Tue, 22 Jul 1997, Ben Laurie wrote:
> 
> > In what way does IIS not follow the ISAPI spec?
> 
> ISAPI spec says that the lpbData member of the EXTENSION_CONTROL_BLOCK
> structure should contain however much data the server read in (at least
> 48k, or the length of the request entity body if it's smaller). The
> cbAvailable member contains how much was read into lpdData, and the
> cbTotalBytes member contains how much is being sent by the client total
> (this is equivilent to the CGI CONTENT_LENGTH variable, sayeth the spec).
> 
> The ISA's HttpExtensionProc() function is supposed to compare cbAvailable
> to cbTotalBytes. If they're equal, it figures the server has read all the
> data, and it's in lpbData. If they're not, it's supposed to call
> ReadClient() to make up the difference.
> 
> However, IIS apparently does not do that. It null-terminates the string
> in lpdData, and makes cbAvailable include the length of lpdData, with the
> null. This means that cbAvailable can't equal cbTotalBytes for inputs
> less than 48k, unless cbTotalBytes also is one more than the
> Content-Length header (and the CONTENT_LENGTH variable). Which messes the
> whole thing to hell if the ISA actually has to call ReadClient().
> 
> To be honest, I don't know exactly what IIS does in all cases, just some
> simple ones. So maybe it does odd things that make this all work. But I
> don't know what those are.

The interesting question is, what does it do when Content-Length is
exactly 48k? 48k+1? 48k+lots? 48k-1? 48k-2?

Cheers,

Ben.

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email:
ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message