cvs: php4(PHP_4_3) /sapi/thttpd thttpd_patch
| From: | Sascha Schumann | Date: | Thu, 15 May 2003 16:55:22 +0000 |
| Subject: | cvs: php4(PHP_4_3) /sapi/thttpd thttpd_patch | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20941@lists.php.net to get a copy of this message | ||
sas Thu May 15 12:55:22 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/sapi/thttpd thttpd_patch
Log:
MFH
Index: php4/sapi/thttpd/thttpd_patch
diff -u php4/sapi/thttpd/thttpd_patch:1.31.2.9 php4/sapi/thttpd/thttpd_patch:1.31.2.10
--- php4/sapi/thttpd/thttpd_patch:1.31.2.9 Thu May 15 12:43:29 2003
+++ php4/sapi/thttpd/thttpd_patch Thu May 15 12:55:21 2003
@@ -1406,7 +1406,7 @@
** If you have a stat buffer on the file, pass it in, otherwise pass 0.
diff -ur thttpd-2.21b/thttpd.c thttpd-2.21b-cool/thttpd.c
--- thttpd-2.21b/thttpd.c Tue Apr 24 00:41:57 2001
-+++ thttpd-2.21b-cool/thttpd.c Thu May 15 18:38:35 2003
++++ thttpd-2.21b-cool/thttpd.c Thu May 15 18:51:28 2003
@@ -53,6 +53,10 @@
#endif
#include <unistd.h>
@@ -2045,7 +2045,7 @@
/* In lingering-close mode we just read and ignore bytes. An error
** or EOF ends things, otherwise we go until a timeout.
*/
-@@ -1569,6 +1728,61 @@
+@@ -1569,6 +1728,63 @@
}
@@ -2057,13 +2057,15 @@
+
+ n = read(hc->conn_fd, hc->read_buf + hc->read_idx,
+ hc->contentlength - (hc->read_idx - hc->checked_idx));
-+
++
+ if (n <= 0) {
+ if (errno == EAGAIN)
+ return;
+ clear_connection(c, tvP, 0);
+ return;
+ }
++
++ c->last_io = httpd_time_now;
+
+ hc->read_idx += n;
+
@@ -2107,7 +2109,7 @@
static int
check_throttles( connecttab* c )
{
-@@ -1635,23 +1849,18 @@
+@@ -1635,23 +1851,18 @@
static void
@@ -2137,7 +2139,7 @@
if ( c->wakeup_timer != (Timer*) 0 )
{
tmr_cancel( c->wakeup_timer );
-@@ -1669,13 +1878,36 @@
+@@ -1669,13 +1880,36 @@
** circumstances that make a lingering close necessary. If the flag
** isn't set we do the real close now.
*/
@@ -2176,7 +2178,7 @@
client_data.p = c;
c->linger_timer = tmr_create(
tvP, linger_clear_connection, client_data, LINGER_TIME * 1000L, 0 );
-@@ -1684,9 +1916,19 @@
+@@ -1684,9 +1918,19 @@
syslog( LOG_CRIT, "tmr_create(linger_clear_connection) failed" );
exit( 1 );
}
@@ -2197,7 +2199,7 @@
}
-@@ -1702,45 +1944,12 @@
+@@ -1702,45 +1946,12 @@
tmr_cancel( c->linger_timer );
c->linger_timer = 0;
}
@@ -2244,7 +2246,7 @@
static void
wakeup_connection( ClientData client_data, struct timeval* nowP )
-@@ -1783,6 +1992,43 @@
+@@ -1783,6 +1994,43 @@
}
#endif /* STATS_TIME */
@@ -2288,7 +2290,7 @@
/* Generate debugging statistics syslog messages for all packages. */
static void
-@@ -1826,3 +2072,41 @@
+@@ -1826,3 +2074,42 @@
stats_connections = stats_bytes = 0L;
stats_simultaneous = 0;
}
@@ -2312,6 +2314,7 @@
+ }
+ break;
+ case CNST_READING:
++ case CNST_READING_BODY:
+ checked++;
+ if ((now - c->last_io) > IDLE_READ_TIMELIMIT) {
+ clear_connection( c, nowP, 0 );