]> granicus.if.org Git - php/commitdiff
Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL
authorIlia Alshanetsky <iliaa@php.net>
Wed, 3 Jun 2009 12:39:50 +0000 (12:39 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 3 Jun 2009 12:39:50 +0000 (12:39 +0000)
SOAP services)

#original patch by lordelph at gmail dot com

ext/soap/php_http.c

index 42c939bdb20ffabbd40f715a1ad4d002b9ce7ad2..563087a31d2d84a0ed6aad9f977ef8a226ece61e 100644 (file)
@@ -612,6 +612,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 {