Bug #9280 Updated: HTTP/1.1 Expect: header not honoured

From: Date: Sun, 22 Jul 2001 16:49:35 +0000
Subject: Bug #9280 Updated: HTTP/1.1 Expect: header not honoured
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-60619@lists.php.net to get a copy of this message
ID: 9280 Updated by: andy Reported By: paulc@datatote.co.uk Old Status: Feedback Status: Closed Bug Type: Apache related Operating System: Linux PHP Version: 4.0.4pl1 New Comment: no feedback after 38 days. Previous Comments: ------------------------------------------------------------------------ [2001-06-14 20:45:53] sniper@php.net Do you have any example script that can be used to reproduce this behaviour? (I'm being lazy here.. :) ------------------------------------------------------------------------ [2001-02-15 09:10:32] paulc@datatote.co.uk When a PHP page is requested via HTTP/1.1, and the HTTP header "Expect: 100-continue" is supplied, PHP does not honour the request. This is because it is failing to call ap_should_client_block(). The file sapi/apache/mod_php4.c needs modification. The following change has been tested and works. Hopefully someone can make sense of this diff output: --- sapi/apache/mod_php4.c Wed Jan 3 22:07:59 2001 +++ sapi/apache_modified/mod_php4.c Thu Feb 15 13:56:12 2001 @@ -159,14 +159,16 @@ void (*handler)(int); handler = signal(SIGPIPE, SIG_IGN); - while (total_read_bytes<count_bytes) { - hard_timeout("Read POST information", r); /* start timeout timer - read_bytes = get_client_block(r, buffer+total_read_bytes, count_bytes-total_read_bytes); - reset_timeout(r); - if (read_bytes<=0) { - break; + if (ap_should_client_block(r)) { + while (total_read_bytes<count_bytes) { + hard_timeout("Read POST information", r); /* start timeout timer */ + read_bytes = get_client_block(r, buffer+total_read_bytes, count_bytes-total_read_bytes); + reset_timeout(r); + if (read_bytes<=0) { + break; + } + total_read_bytes += read_bytes; } - total_read_bytes += read_bytes; } signal(SIGPIPE, handler); return total_read_bytes; ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=9280&edit=1

« previous php.dev (#60619) next »