]> 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:59 +0000 (11:03 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 6 Sep 2006 11:03:59 +0000 (11:03 +0000)
ext/soap/php_http.c

index 6032fa0cb4b47428bcc7045d23ef542245cc8161..229fb52a218558fe0e4c9f9860ae99aceeaa57c5 100644 (file)
@@ -398,6 +398,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, '?');
@@ -499,6 +501,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);
@@ -548,6 +552,8 @@ 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, '?');