httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: read_client_block changes in 1.2?
Date Sun, 22 Sep 1996 19:04:39 GMT

I spotted the same problem with mod_perl_fast with 1.2 and had to change

bytes = read_client_block(php_rqst, buf, length);

to

bytes = read_client_block(php_rqst, buf, length+1);


I think the routine being called takes care of the +1 safety check
for not running off the end of the buffer, therefore giving it just
"length" bytes to work with effectively reduces this to length-1 and
it hasn't got enough space to read everything from the client and
it just hangs.


rob.

-=-=-=-=-


rasmus@vex.net wrote:
>
>I am hoping somebody here might be able to save me a bit of time.  I
>am in the process of getting mod_php to work with the Apache 1.2 code
>and have run into an odd problem.  I am losing all POST data.  I
>have the following calls in my getpost() function:
>    
>    buf = table_get(php_rqst->subprocess_env,"CONTENT_LENGTH");
>    ...
>    length = atoi(buf);
>    ...
>    bytes = read_client_block(php_rqst, buf, length);
>
>In the Apache 1.1 code, this worked ok, but in the 1.2 code the
>returned number of bytes is always 0.  The length variable seems
>to be set correctly going into the read_client_block call.
>
>Does this have something to do with the chunking code?  Am I overlooking
>something obvious?
>
>-Rasmus



Mime
View raw message