sas Tue Apr 24 23:42:24 2001 EDT
Modified files:
/php4/sapi/thttpd thttpd.c
Log:
Fix optimization -- we did not send out custom Response Status Lines.
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.40 php4/sapi/thttpd/thttpd.c:1.41
--- php4/sapi/thttpd/thttpd.c:1.40 Sun Apr 22 07:22:40 2001
+++ php4/sapi/thttpd/thttpd.c Tue Apr 24 23:42:24 2001
@@ -77,17 +77,24 @@
int n = 0;
zend_llist_position pos;
sapi_header_struct *h;
+ size_t len;
if (!SG(sapi_headers).http_status_line) {
- size_t len;
-
snprintf(buf, 1023, "HTTP/1.0 %d Something\r\n",
SG(sapi_headers).http_response_code);
len = strlen(buf);
vec[n].iov_base = buf;
- vec[n++].iov_len = len;
- TG(hc)->status = SG(sapi_headers).http_response_code;
- TG(hc)->bytes_sent += len;
+ vec[n].iov_len = len;
+ } else {
+ vec[n].iov_base = SG(sapi_headers).http_status_line;
+ len = strlen(vec[n].iov_base);
+ vec[n].iov_len = len;
+ vec[++n].iov_base = "\r\n";
+ vec[n].iov_len = 2;
+ len += 2;
}
+ TG(hc)->status = SG(sapi_headers).http_response_code;
+ TG(hc)->bytes_sent += len;
+ n++;
h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
while (h) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]