[PATCH] sapi apache2 uninitialized content-length value

php.internals

Doru Petrescu

22 years ago
Hi, While playing with the upload progress meter I noticed that apache2 sapi implementation does not initialize the content-length sapi variable. Apache 1.3 sapi does! and so does ALL OTHER interfaces. A quick grep into the sources will reveal that only apache2handler and apache2filter does not initialize this. Is there a reason for this ? Or is just something that sliped ? I wrote a patch to fix this. see attached. tested and it works with no problem and correctly reports the content-length. It is very simple and straight forward. copy/paste from apache 1.3 interface. now, I just wish nobody will upload anything over 2GB - integer overflow will doom the upload.
-- Best regards, Doru Petrescu Senior Software Engineer Astral Telecom Bucuresti

Ilia A.

22 years ago
Why not simply do SG(request_info).content_length = 0; ? Ilia

Uwe Schindler

22 years ago
all other sapi modules do it in the same way... At 15:31 20.11.2003, Ilia Alshanetsky wrote:
>Why not simply do SG(request_info).content_length = 0; ? > >Ilia > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php
----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Erlangen, Germany

Doru Petrescu

22 years ago
you missed the point. it is probably zero like it is now, the point was to put the right value there, not some garbage. and of course I DO NEED THAT VALUE at some point in time, and I see no use of having garbage or a wrong value there. also what stroke me is that all other sapi modules were properly initializing this value ... Doru Petrescu On Thu, 2003-11-20 at 16:31, Ilia Alshanetsky wrote: