From: Dan Kalowsky Date: Wed, 14 Aug 2002 17:15:49 +0000 (+0000) Subject: Fix for Bug #9280 with regards to an Expect header. patch submitted by X-Git-Tag: php-4.3.0dev_zend2_alpha3~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0917902b925e79d8e892829802f0c21ebffb203a;p=php Fix for Bug #9280 with regards to an Expect header. patch submitted by Ilia # someone just give the man his php4 karma please! --- diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 3aaa6bafb9..19d03f7e36 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -129,6 +129,14 @@ int sapi_apache_read_post(char *buffer, uint count_bytes TSRMLS_DC) request_rec *r = (request_rec *) SG(server_context); void (*handler)(int); + /* + * This handles the situation where the browser sends a Expect: 100-continue header + * and needs to recieve confirmation from the server on whether or not it can send + * the rest of the request. RFC 2616 + * + */ + if( !ap_should_client_block(r) ) return total_read_bytes; + handler = signal(SIGPIPE, SIG_IGN); while (total_read_bytes