diff options
Diffstat (limited to 'sapi/pi3web/pi3web_sapi.c')
-rw-r--r-- | sapi/pi3web/pi3web_sapi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sapi/pi3web/pi3web_sapi.c b/sapi/pi3web/pi3web_sapi.c index a7176a1b2a..83fe5fdef7 100644 --- a/sapi/pi3web/pi3web_sapi.c +++ b/sapi/pi3web/pi3web_sapi.c @@ -422,9 +422,14 @@ DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB) }; }; break; - case PHP_MODE_INDENT: - header_line = (char *)estrdup("Content-Type: text/plain"); - sapi_add_header_ex(header_line, strlen(header_line), 1, 1, 0 TSRMLS_CC); + case PHP_MODE_INDENT: { + sapi_header_line ctr = {0}; + + ctr.line = "Content-Type: text/plain"; + ctr.line_len = strlen(ctr.line); + + sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); + } if ( open_file_for_scanning( &file_handle TSRMLS_CC ) == SUCCESS ) { zend_indent(); @@ -433,7 +438,6 @@ DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB) { iRet = PIAPI_ERROR; }; - efree(header_line); break; case PHP_MODE_LINT: iRet = (php_lint_script(&file_handle TSRMLS_CC) == SUCCESS) ? |