dmitry          Wed Sep  6 11:03:59 2006 UTC

  Modified files:              
    /php-src/ext/soap   php_http.c 
  Log:
  Fixed support for endpoint's URL without <path> part (Rob)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.96&r2=1.97&diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.96 php-src/ext/soap/php_http.c:1.97
--- php-src/ext/soap/php_http.c:1.96    Tue Aug  8 16:59:11 2006
+++ php-src/ext/soap/php_http.c Wed Sep  6 11:03:59 2006
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_http.c,v 1.96 2006/08/08 16:59:11 tony2001 Exp $ */
+/* $Id: php_http.c,v 1.97 2006/09/06 11:03:59 dmitry Exp $ */
 
 #include "php_soap.h"
 #include "ext/standard/base64.h"
@@ -398,6 +398,8 @@
                }
                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 @@
                                        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 @@
                                        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, '?');

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to