cvs: php4 /sapi/thttpd thttpd.c
| From: | Sascha Schumann | Date: | Tue, 07 Aug 2001 08:34:02 +0000 |
| Subject: | cvs: php4 /sapi/thttpd thttpd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6610@lists.php.net to get a copy of this message | ||
sas Tue Aug 7 04:34:02 2001 EDT
Modified files:
/php4/sapi/thttpd thttpd.c
Log:
The module usually did not send out Content-Type: text/html.
No major browser seems to care, Opera does though.
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.53 php4/sapi/thttpd/thttpd.c:1.54
--- php4/sapi/thttpd/thttpd.c:1.53 Sun Aug 5 11:29:47 2001
+++ php4/sapi/thttpd/thttpd.c Tue Aug 7 04:34:02 2001
@@ -95,6 +95,13 @@
TG(hc)->bytes_sent += len;
n++;
+#define DEF_CONTENT_TYPE_LINE "Content-Type: text/html"
+ if (SG(sapi_headers).send_default_content_type) {
+ vec[n].iov_base = DEF_CONTENT_TYPE_LINE;
+ vec[n].iov_len = sizeof(DEF_CONTENT_TYPE_LINE) - 1;
+ n++;
+ }
+
h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
while (h) {
vec[n].iov_base = h->header;