- fixed typo in month list: Okt should have been Oct
authorMichael Wallner <mike@php.net>
Tue, 4 Oct 2005 08:41:44 +0000 (08:41 +0000)
committerMichael Wallner <mike@php.net>
Tue, 4 Oct 2005 08:41:44 +0000 (08:41 +0000)
- push out headers in http_exit()
- fixed another typo

http_api.c
http_date_api.c
http_send_api.c

index 71112618763859b1e68722515dc34acf2ec29a20..34481459d38131ca72737d3468e98ee87eb7cd6a 100644 (file)
@@ -220,7 +220,7 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header
                }
        }
        
-       if (body) {
+       if (php_header(TSRMLS_C) && body) {
                PHPWRITE(body, strlen(body));
        }
        
index 37047b602326187ecd20770609c158f58a7b8f71..6770c0270edb2dc5efb34fb324b99d0547d89fe1 100644 (file)
@@ -42,7 +42,7 @@ static const char *weekdays[] = {
 };
 static const char *months[] = {
        "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-       "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"
+       "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
 enum assume_next {
        DATE_MDAY,
index 3f6f2a6ef524c75e9b5071b9ba8e52cd55338eba..dc73233a7691599d0766d6a34815014838fb0e90 100644 (file)
@@ -158,7 +158,11 @@ PHP_HTTP_API STATUS _http_send_header_ex(const char *name, size_t name_len, cons
        header[header_len] = '\0';
        snprintf(header, header_len, "%s: %s", name, value);
        ret = http_send_header_string_ex(header, replace);
-       efree(header);
+       if (sent_header) {
+               *sent_header = header;
+       } else {
+               efree(header);
+       }
        return ret;
 }
 /* }}} */
@@ -185,7 +189,7 @@ PHP_HTTP_API STATUS _http_send_last_modified_ex(time_t t, char **sent_header TSR
                return FAILURE;
        }
 
-       ret = http_send_header_ex("Last-Modified", lenof("Last-Modifed"), date, strlen(date), 1, sent_header);
+       ret = http_send_header_ex("Last-Modified", lenof("Last-Modified"), date, strlen(date), 1, sent_header);
        efree(date);
 
        /* remember */