From: Philip Hofstetter Date: Wed, 3 Sep 2014 12:35:40 +0000 (+0200) Subject: fix bug #67955 X-Git-Tag: php-5.6.1RC1~16^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9befa8c5f7570808dbf31004ea33534cd61b7383;p=php fix bug #67955 this fixes a regression from 6c2a8068207a02b3d7ae7416a9967dad0a81e61f. smart_str_appendl is expecting the length as the length of the string, but key_length is the byte length of the key, including the 0 terminator. As such, the cookie name appeneded to the header would now also include the 0 terminator of the key name which then would be sent to the server. --- diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 2a5679a439..4a5829fadb 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -830,7 +830,7 @@ try_again: (zend_hash_index_find(Z_ARRVAL_PP(data), 2, (void**)&tmp) == FAILURE || in_domain(phpurl->host,Z_STRVAL_PP(tmp))) && (use_ssl || zend_hash_index_find(Z_ARRVAL_PP(data), 3, (void**)&tmp) == FAILURE)) { - smart_str_appendl(&soap_headers, key, key_len); + smart_str_appendl(&soap_headers, key, key_len-1); smart_str_appendc(&soap_headers, '='); smart_str_appendl(&soap_headers, Z_STRVAL_PP(value), Z_STRLEN_PP(value)); smart_str_appendc(&soap_headers, ';');