]> granicus.if.org Git - php/commitdiff
Fixed support for endpoint's URL without <path> part (Rob)
authorDmitry Stogov <dmitry@php.net>
Wed, 6 Sep 2006 11:03:45 +0000 (11:03 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 6 Sep 2006 11:03:45 +0000 (11:03 +0000)
ext/soap/php_http.c

index 12fe4290a7c346e6c5e39dd5bdc4ad95332e4fcb..b5df837dc77bcee0f09241714be51cdd8bae4ea7 100644 (file)
@@ -401,6 +401,8 @@ try_again:
                }
                if (phpurl->path) {
                        smart_str_appends(&soap_headers, phpurl->path);
+               } else {
+                       smart_str_appendc(&soap_headers, '/');
                }
                if (phpurl->query) {
                        smart_str_appendc(&soap_headers, '?');
@@ -518,6 +520,8 @@ try_again:
                                        PHP_MD5Update(&md5ctx, (unsigned char*)"POST:", sizeof("POST:")-1);
                                        if (phpurl->path) {
                                                PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->path, strlen(phpurl->path));
+                                       } else {
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)"/", 1);
                                        }
                                        if (phpurl->query) {
                                                PHP_MD5Update(&md5ctx, (unsigned char*)"?", 1);
@@ -574,7 +578,9 @@ try_again:
                                        smart_str_append_const(&soap_headers, "\", uri=\"");
                                        if (phpurl->path) {
                                                smart_str_appends(&soap_headers, phpurl->path);
-                                       }
+                                       } else {
+                                               smart_str_appendc(&soap_headers, '/');
+                                       } 
                                        if (phpurl->query) {
                                                smart_str_appendc(&soap_headers, '?');
                                                smart_str_appends(&soap_headers, phpurl->query);