mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.3'
* PHP-7.3: Fix #76954: apache_response_headers removes last character from header name
This commit is contained in:
commit
c266a19094
2 changed files with 50 additions and 2 deletions
|
@ -1689,9 +1689,9 @@ static void add_response_header(sapi_header_struct *h, zval *return_value) /* {{
|
|||
len = p - h->header;
|
||||
}
|
||||
if (len > 0) {
|
||||
do {
|
||||
while (len != 0 && (h->header[len-1] == ' ' || h->header[len-1] == '\t')) {
|
||||
len--;
|
||||
} while (len != 0 && (h->header[len-1] == ' ' || h->header[len-1] == '\t'));
|
||||
}
|
||||
if (len) {
|
||||
s = do_alloca(len + 1, use_heap);
|
||||
memcpy(s, h->header, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue