From: Ilia Alshanetsky Date: Wed, 3 Jun 2009 12:41:46 +0000 (+0000) Subject: MFB: Fixed bug #46386 (Digest authentication with SOAP module fails against X-Git-Tag: php-5.2.10RC2~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e79cbe9b10a1930c89aeccda87fd3af08fcb1e2;p=php MFB: Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL SOAP services) --- diff --git a/NEWS b/NEWS index 4b672b0750..d18c03d9f3 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ - Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values). (Ilia, lytboris at gmail dot com) - Fixed bug #48247 (Crash on errors during startup). (Stas) +- Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL + SOAP services). (Ilia, lordelph at gmail dot com) - Fixed bug #42143 (The constant NAN is reported as 0 on Windows) (Kanwaljeet Singla, Venkat Raman Don) diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 4ff4ed9577..17c72a7fb3 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -614,6 +614,11 @@ try_again: smart_str_append_const(&soap_headers, "\", opaque=\""); smart_str_appendl(&soap_headers, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); } + if (zend_hash_find(Z_ARRVAL_PP(digest), "algorithm", sizeof("algorithm"), (void **)&tmp) == SUCCESS && + Z_TYPE_PP(tmp) == IS_STRING) { + smart_str_append_const(&soap_headers, "\", algorithm=\""); + smart_str_appendl(&soap_headers, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); + } smart_str_append_const(&soap_headers, "\"\r\n"); } } else {