From: Michael Wallner Date: Tue, 4 Oct 2005 08:41:44 +0000 (+0000) Subject: - fixed typo in month list: Okt should have been Oct X-Git-Tag: RELEASE_0_14_2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e9a1f5cc8b34c4c3a0ceb55698a1a6aa11cc8c2a;p=m6w6%2Fext-http - fixed typo in month list: Okt should have been Oct - push out headers in http_exit() - fixed another typo --- diff --git a/http_api.c b/http_api.c index 7111261..3448145 100644 --- a/http_api.c +++ b/http_api.c @@ -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)); } diff --git a/http_date_api.c b/http_date_api.c index 37047b6..6770c02 100644 --- a/http_date_api.c +++ b/http_date_api.c @@ -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, diff --git a/http_send_api.c b/http_send_api.c index 3f6f2a6..dc73233 100644 --- a/http_send_api.c +++ b/http_send_api.c @@ -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 */