httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@organic.com>
Subject Re: cvs commit: apache/src/nt mod_isapi.c modules.c
Date Tue, 22 Jul 1997 20:51:38 GMT
On Tue, 22 Jul 1997, Ben Laurie wrote:

> >   Add nt/mod_isapi.c, which implements most of the ISAPI Extension 2.0
> >   specification. It has a temporary cap of the input buffer at 48k,
> >   until a better solution can be found.
> 
> I haven't quite understood what the problem is, exactly. Could you
> explain?

Sure. The ISAPI specification says that the server should read in some
chunk (IIS uses 48k, and the spec mandates 48k or larger) of the client
data, and store it in a buffer in the structure passed to the ISA. If
there's more than that, the ISA can call ReadClient() to get the rest of
the data. However, IIS doesn't follow the ISAPI spec in a way that makes
it so I can't do this. The only way I could figure out how to it work
with both the ISAPI spec and with existing ISAs is to read in the entire
request entity, and store it in the structure.

Fine, so I did it that way. WebSite does the same thing. The problem is
that the code allocates memory based on the Content-Length passed by the
client, whether or not that number is accurat. So if I opened up a POST
to one of these ISAs, and passed it a "Content-length: 100000000", it
would try and allocate 100 megs of memory, most likely doing something
nasty to the server if that much memory wasn't available.

That is the problem.

-- Alexei Kosut <akosut@organic.com>


Mime
View raw message