mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- fix php_apache_sapi_header_handler() modifying sapi_header
# already taken care of in apcache1 sapi
This commit is contained in:
parent
91f4b380d6
commit
23b8ce3876
2 changed files with 6 additions and 2 deletions
|
@ -103,7 +103,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
|
|||
{
|
||||
php_struct *ctx;
|
||||
ap_filter_t *f;
|
||||
char *val;
|
||||
char *val, *ptr;
|
||||
|
||||
ctx = SG(server_context);
|
||||
f = ctx->r->output_filters;
|
||||
|
@ -114,6 +114,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
|
|||
sapi_free_header(sapi_header);
|
||||
return 0;
|
||||
}
|
||||
ptr = val;
|
||||
|
||||
*val = '\0';
|
||||
|
||||
|
@ -128,6 +129,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
|
|||
else
|
||||
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
|
||||
|
||||
*ptr = ':';
|
||||
return SAPI_HEADER_ADD;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ static int
|
|||
php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_struct *sapi_headers TSRMLS_DC)
|
||||
{
|
||||
php_struct *ctx;
|
||||
char *val;
|
||||
char *val, *ptr;
|
||||
|
||||
ctx = SG(server_context);
|
||||
|
||||
|
@ -96,6 +96,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_stru
|
|||
sapi_free_header(sapi_header);
|
||||
return 0;
|
||||
}
|
||||
ptr = val;
|
||||
|
||||
*val = '\0';
|
||||
|
||||
|
@ -111,6 +112,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_stru
|
|||
} else {
|
||||
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
|
||||
}
|
||||
*ptr = ':';
|
||||
|
||||
return SAPI_HEADER_ADD;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue