diff options
author | Zeev Suraski <zeev@php.net> | 2000-02-26 05:03:41 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-02-26 05:03:41 +0000 |
commit | a508bec8196afd136ce65d1363e51e5204cc7600 (patch) | |
tree | 8df86d4fe66513c11e57b1f916b12c739524f914 /sapi/isapi/php4isapi.c | |
parent | c7843d3b4eab95c53538558b44caeda6580d260a (diff) | |
download | php-git-a508bec8196afd136ce65d1363e51e5204cc7600.tar.gz |
- From CODING_STANDARDS:
[6] NEVER USE strncat(). If you're absolutely sure you know what you're doing,
check its man page again, and only then, consider using it, and even then,
try avoiding it.
strncat() is your enemy!
- Fix several SAPI services, get rid of the default_content_type (it's always
composed of the mime type and charset now).
- Win32 works again
Diffstat (limited to 'sapi/isapi/php4isapi.c')
-rw-r--r-- | sapi/isapi/php4isapi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c index 8bcb3b06dd..3c2e049b00 100644 --- a/sapi/isapi/php4isapi.c +++ b/sapi/isapi/php4isapi.c @@ -183,11 +183,12 @@ static int sapi_isapi_send_headers(sapi_headers_struct *sapi_headers SLS_DC) LPEXTENSION_CONTROL_BLOCK lpECB = (LPEXTENSION_CONTROL_BLOCK) SG(server_context); HSE_SEND_HEADER_EX_INFO header_info; char status_buf[MAX_STATUS_LENGTH]; - sapi_header_struct default_content_type = { SAPI_DEFAULT_CONTENT_TYPE, sizeof(SAPI_DEFAULT_CONTENT_TYPE)-1 }; + sapi_header_struct default_content_type; PLS_FETCH(); /* Obtain headers length */ if (SG(sapi_headers).send_default_content_type) { + sapi_get_default_content_type_header(&default_content_type SLS_CC); accumulate_header_length(&default_content_type, (void *) &total_length); } zend_llist_apply_with_argument(&SG(sapi_headers).headers, (void (*)(void *, void *)) accumulate_header_length, (void *) &total_length); @@ -197,6 +198,7 @@ static int sapi_isapi_send_headers(sapi_headers_struct *sapi_headers SLS_DC) combined_headers_ptr = combined_headers; if (SG(sapi_headers).send_default_content_type) { concat_header(&default_content_type, (void *) &combined_headers_ptr); + sapi_free_header(&default_content_type); /* we no longer need it */ } zend_llist_apply_with_argument(&SG(sapi_headers).headers, (void (*)(void *, void *)) concat_header, (void *) &combined_headers_ptr); *combined_headers_ptr++ = '\r'; |