[PHP4BETA] CVS update: php4

From: Date: Tue, 11 May 1999 12:52:18 +0000
Subject: [PHP4BETA] CVS update: php4
Groups: php.version4 
Request: Send a blank email to php-version4+get-766@lists.php.net to get a copy of this message
Date: Tuesday May 11, 1999 @ 8:52 Author: zeev Update of /repository/php4 In directory php:/tmp/cvs-serv23384 Modified Files: mod_php3.c Log Message: Support POST in Apache Index: php4/mod_php3.c diff -u php4/mod_php3.c:1.17 php4/mod_php3.c:1.18 --- php4/mod_php3.c:1.17 Mon May 10 20:09:22 1999 +++ php4/mod_php3.c Tue May 11 08:52:17 1999 @@ -28,7 +28,7 @@ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php3.c,v 1.17 1999/05/11 00:09:22 zeev Exp $ */ +/* $Id: mod_php3.c,v 1.18 1999/05/11 12:52:17 zeev Exp $ */ #include "httpd.h" #include "http_config.h" @@ -108,7 +108,22 @@ int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC) { - return 0; + uint total_read_bytes=0, read_bytes; + request_rec *r = (request_rec *) SG(server_context); + 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; + } + total_read_bytes += read_bytes; + } + signal(SIGPIPE, handler); + return total_read_bytes; } -- PHP 4 Beta

« previous php.version4 (#766) next »