cvs: php4 /sapi/thttpd thttpd.c

From: Date: Sun, 12 Nov 2000 21:10:09 +0000
Subject: cvs: php4 /sapi/thttpd thttpd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2565@lists.php.net to get a copy of this message
sas Sun Nov 12 13:10:09 2000 EDT Modified files: /php4/sapi/thttpd thttpd.c Log: Fix aborted connection handling and stop modifying thttpd data Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.27 php4/sapi/thttpd/thttpd.c:1.28 --- php4/sapi/thttpd/thttpd.c:1.27 Sun Oct 29 08:01:02 2000 +++ php4/sapi/thttpd/thttpd.c Sun Nov 12 13:10:09 2000 @@ -45,7 +45,7 @@ n = send(TG(hc)->conn_fd, str, str_length, 0); - if (n == EPIPE) { + if (n == -1 && errno == EPIPE) { php_handle_aborted_connection(); } @@ -224,8 +224,9 @@ size_t filename_len; size_t cwd_len; - SG(request_info).query_string = TG(hc)->query; + SG(request_info).query_string = TG(hc)->query?strdup(TG(hc)->query):NULL; + filename_len = strlen(TG(hc)->expnfilename); cwd_len = strlen(TG(hc)->hs->cwd); @@ -260,6 +261,8 @@ static void thttpd_request_dtor(TLS_D SLS_DC) { + if (SG(request_info).query_string) + free(SG(request_info).query_string); free(SG(request_info).request_uri); free(SG(request_info).path_translated); }

« previous php.cvs (#2565) next »