diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
| commit | fd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (patch) | |
| tree | bfd17d84c5181d7b98d7d66f56573f4fc897e31c /ext/soap | |
| parent | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (diff) | |
| download | php-upstream/5.3.5.tar.gz | |
Imported Upstream version 5.3.5upstream/5.3.5
Diffstat (limited to 'ext/soap')
| -rw-r--r-- | ext/soap/php_encoding.c | 10 | ||||
| -rw-r--r-- | ext/soap/php_http.c | 9 | ||||
| -rw-r--r-- | ext/soap/php_packet_soap.c | 4 | ||||
| -rw-r--r-- | ext/soap/php_sdl.c | 21 | ||||
| -rw-r--r-- | ext/soap/tests/bugs/bug50698_1.phpt | 2 | ||||
| -rw-r--r-- | ext/soap/tests/bugs/bug50698_2.phpt | 2 | ||||
| -rw-r--r-- | ext/soap/tests/bugs/bug50698_3.phpt | 2 | ||||
| -rw-r--r-- | ext/soap/tests/bugs/bug50698_4.phpt | 2 | ||||
| -rw-r--r-- | ext/soap/tests/bugs/bug50762.phpt | 2 |
9 files changed, 37 insertions, 17 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 621ae0858..ac909c8e4 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c 300457 2010-06-15 08:22:51Z dmitry $ */ +/* $Id: php_encoding.c 303034 2010-09-03 22:24:08Z rasmus $ */ #include <time.h> @@ -373,7 +373,7 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml HashTable *ht = Z_OBJPROP_P(data); if (zend_hash_find(ht, "enc_type", sizeof("enc_type"), (void **)&ztype) == FAILURE) { - soap_error0(E_ERROR, "Encoding: SoapVar hasn't 'enc_type' property"); + soap_error0(E_ERROR, "Encoding: SoapVar has no 'enc_type' property"); } if (zend_hash_find(ht, "enc_stype", sizeof("enc_stype"), (void **)&zstype) == SUCCESS) { @@ -1751,7 +1751,7 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * return 2; } else { if (strict) { - soap_error1(E_ERROR, "Encoding: object hasn't '%s' property", model->u.element->name); + soap_error1(E_ERROR, "Encoding: object has no '%s' property", model->u.element->name); } return 0; } @@ -1784,7 +1784,7 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * return 2; } else { if (strict) { - soap_error0(E_ERROR, "Encoding: object hasn't 'any' property"); + soap_error0(E_ERROR, "Encoding: object has no 'any' property"); } return 0; } @@ -3632,7 +3632,7 @@ static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type TS zval **ztype; if (zend_hash_find(Z_OBJPROP_PP(tmp), "enc_type", sizeof("enc_type"), (void **)&ztype) == FAILURE) { - soap_error0(E_ERROR, "Encoding: SoapVar hasn't 'enc_type' property"); + soap_error0(E_ERROR, "Encoding: SoapVar has no 'enc_type' property"); } cur_type = Z_LVAL_PP(ztype); diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index a6a645fa9..1f5c48fdf 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c 299903 2010-05-28 12:18:03Z dmitry $ */ +/* $Id: php_http.c 304084 2010-10-05 11:43:59Z dmitry $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -137,6 +137,13 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph smart_str_appendc(&soap_headers, ':'); smart_str_append_unsigned(&soap_headers, phpurl->port); smart_str_append_const(&soap_headers, " HTTP/1.1\r\n"); + smart_str_append_const(&soap_headers, "Host: "); + smart_str_appends(&soap_headers, phpurl->host); + if (phpurl->port != 80) { + smart_str_appendc(&soap_headers, ':'); + smart_str_append_unsigned(&soap_headers, phpurl->port); + } + smart_str_append_const(&soap_headers, "\r\n"); proxy_authentication(this_ptr, &soap_headers TSRMLS_CC); smart_str_append_const(&soap_headers, "\r\n"); if (php_stream_write(stream, soap_headers.c, soap_headers.len) != soap_headers.len) { diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index 0b02fbd4a..e86a204fc 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_packet_soap.c 303034 2010-09-03 22:24:08Z rasmus $ */ #include "php_soap.h" @@ -340,7 +340,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction } } } else { - /* Function hasn't WSDL description */ + /* Function has no WSDL description */ xmlNodePtr val; val = resp->children; while (val != NULL) { diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 256ece55c..37d519e23 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c 299013 2010-05-05 07:43:45Z dmitry $ */ +/* $Id: php_sdl.c 305198 2010-11-08 11:34:32Z dmitry $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" @@ -373,7 +373,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include soap_error1(E_ERROR, "Parsing WSDL: <message> '%s' already defined", name->children->content); } } else { - soap_error0(E_ERROR, "Parsing WSDL: <message> hasn't name attribute"); + soap_error0(E_ERROR, "Parsing WSDL: <message> has no name attribute"); } } else if (node_is_equal(trav,"portType")) { @@ -383,7 +383,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include soap_error1(E_ERROR, "Parsing WSDL: <portType> '%s' already defined", name->children->content); } } else { - soap_error0(E_ERROR, "Parsing WSDL: <portType> hasn't name attribute"); + soap_error0(E_ERROR, "Parsing WSDL: <portType> has no name attribute"); } } else if (node_is_equal(trav,"binding")) { @@ -393,7 +393,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include soap_error1(E_ERROR, "Parsing WSDL: <binding> '%s' already defined", name->children->content); } } else { - soap_error0(E_ERROR, "Parsing WSDL: <binding> hasn't name attribute"); + soap_error0(E_ERROR, "Parsing WSDL: <binding> has no name attribute"); } } else if (node_is_equal(trav,"service")) { @@ -403,7 +403,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include soap_error1(E_ERROR, "Parsing WSDL: <service> '%s' already defined", name->children->content); } } else { - soap_error0(E_ERROR, "Parsing WSDL: <service> hasn't name attribute"); + soap_error0(E_ERROR, "Parsing WSDL: <service> has no name attribute"); } } else if (!node_is_equal(trav,"documentation")) { soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name); @@ -3250,10 +3250,13 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC) php_stream_context_set_option(context, "http", "proxy", str_proxy); zval_ptr_dtor(&str_proxy); - MAKE_STD_ZVAL(str_proxy); - ZVAL_BOOL(str_proxy, 1); - php_stream_context_set_option(context, "http", "request_fulluri", str_proxy); - zval_ptr_dtor(&str_proxy); + if (uri_len < sizeof("https://")-1 || + strncasecmp(uri, "https://", sizeof("https://")-1) != 0) { + MAKE_STD_ZVAL(str_proxy); + ZVAL_BOOL(str_proxy, 1); + php_stream_context_set_option(context, "http", "request_fulluri", str_proxy); + zval_ptr_dtor(&str_proxy); + } proxy_authentication(this_ptr, &headers TSRMLS_CC); } diff --git a/ext/soap/tests/bugs/bug50698_1.phpt b/ext/soap/tests/bugs/bug50698_1.phpt index c5d634a97..eb5f1e028 100644 --- a/ext/soap/tests/bugs/bug50698_1.phpt +++ b/ext/soap/tests/bugs/bug50698_1.phpt @@ -1,5 +1,7 @@ --TEST-- Request #50698_1 (SoapClient should handle wsdls with some incompatiable endpoints) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --INI-- soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/bugs/bug50698_2.phpt b/ext/soap/tests/bugs/bug50698_2.phpt index 86ddf4806..a39f4b56b 100644 --- a/ext/soap/tests/bugs/bug50698_2.phpt +++ b/ext/soap/tests/bugs/bug50698_2.phpt @@ -1,5 +1,7 @@ --TEST-- Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatiable and incompatiable endpoints.) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --INI-- soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/bugs/bug50698_3.phpt b/ext/soap/tests/bugs/bug50698_3.phpt index 16a24dbe5..6cee6a67e 100644 --- a/ext/soap/tests/bugs/bug50698_3.phpt +++ b/ext/soap/tests/bugs/bug50698_3.phpt @@ -1,5 +1,7 @@ --TEST-- Request #50698_3 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large set of endpoints all incompatiable.) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --INI-- soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/bugs/bug50698_4.phpt b/ext/soap/tests/bugs/bug50698_4.phpt index ca444d777..bb02d0093 100644 --- a/ext/soap/tests/bugs/bug50698_4.phpt +++ b/ext/soap/tests/bugs/bug50698_4.phpt @@ -1,5 +1,7 @@ --TEST-- Request #50698_4 (SoapClient should handle wsdls with some incompatiable endpoints) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --INI-- soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/bugs/bug50762.phpt b/ext/soap/tests/bugs/bug50762.phpt index f9099f1ac..77eb6ee6d 100644 --- a/ext/soap/tests/bugs/bug50762.phpt +++ b/ext/soap/tests/bugs/bug50762.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #50762 (in WSDL mode Soap Header handler function only being called if defined in WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --FILE-- <?php class testSoap { |
