summaryrefslogtreecommitdiff
path: root/ext/soap/php_http.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-09-06 11:03:45 +0000
committerDmitry Stogov <dmitry@php.net>2006-09-06 11:03:45 +0000
commit76d748f372de33c1b488b5f330381a9461907d65 (patch)
tree10e7f61d0cf82e2a616ebd01344c3aaf8eb93bce /ext/soap/php_http.c
parent0c3c55edac9a0d27ca0fc829ab34bf9116ef7fca (diff)
downloadphp-git-76d748f372de33c1b488b5f330381a9461907d65.tar.gz
Fixed support for endpoint's URL without <path> part (Rob)
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r--ext/soap/php_http.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 12fe4290a7..b5df837dc7 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -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);