cvs: php4 /sapi/cgi cgi_main.c
| From: | Edin Kadribasic | Date: | Fri, 22 Nov 2002 13:55:27 +0000 |
| Subject: | cvs: php4 /sapi/cgi cgi_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-16551@lists.php.net to get a copy of this message | ||
edink Fri Nov 22 08:55:27 2002 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
MFB: Don't send default http status (200).
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.194 php4/sapi/cgi/cgi_main.c:1.195
--- php4/sapi/cgi/cgi_main.c:1.194 Fri Nov 22 05:15:47 2002
+++ php4/sapi/cgi/cgi_main.c Fri Nov 22 08:55:27 2002
@@ -238,7 +238,6 @@
static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
{
char buf[1024];
- int len;
sapi_header_struct *h;
zend_llist_position pos;
long rfc2616_headers = 0;
@@ -252,13 +251,17 @@
rfc2616_headers = 0;
}
- if (rfc2616_headers && SG(sapi_headers).http_status_line) {
- len = sprintf(buf, "%s\r\n", SG(sapi_headers).http_status_line);
- } else {
- len = sprintf(buf, "Status: %d\r\n", SG(sapi_headers).http_response_code);
- }
+ if (SG(sapi_headers).http_response_code != 200) {
+ int len;
+
+ if (rfc2616_headers) {
+ len = sprintf(buf, "%s\r\n", SG(sapi_headers).http_status_line);
+ } else {
+ len = sprintf(buf, "Status: %d\r\n", SG(sapi_headers).http_response_code);
+ }
- PHPWRITE_H(buf, len);
+ PHPWRITE_H(buf, len);
+ }
if (SG(sapi_headers).send_default_content_type) {
char *hd;