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

From: Date: Fri, 15 Jun 2001 00:45:53 +0000
Subject: Bug #9280 Updated: HTTP/1.1 Expect: header not honoured
Groups: php.dev 
Request: Send a blank email to php-dev+get-57159@lists.php.net to get a copy of this message
ID: 9280 Updated by: sniper Reported By: paulc@datatote.co.uk Old-Status: Open Status: Feedback Bug Type: Apache related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: Do you have any example script that can be used to reproduce this behaviour? (I'm being lazy here.. :) Previous Comments: --------------------------------------------------------------------------- [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; --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9280&edit=2

« previous php.dev (#57159) next »