diff options
author | Dmitry Stogov <dmitry@php.net> | 2005-08-01 11:38:02 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2005-08-01 11:38:02 +0000 |
commit | 1066066436912ce5914b5f6bd22761b175637739 (patch) | |
tree | 19e62089f7cb75db935bd3143e1f43bd73283657 /ext/soap/php_http.c | |
parent | cf6bb997237629d74389204642547e0c1d4484e8 (diff) | |
download | php-git-1066066436912ce5914b5f6bd22761b175637739.tar.gz |
Allow SOAP work when allow_url_fopen is turned off.
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r-- | ext/soap/php_http.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 70c16645f6..dfbae27c1b 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -234,6 +234,7 @@ int make_http_soap_request(zval *this_ptr, int http_status; int content_type_xml = 0; char *content_encoding; + zend_bool old_allow_url_fopen; if (this_ptr == NULL || Z_TYPE_P(this_ptr) != IS_OBJECT) { return FALSE; @@ -315,10 +316,14 @@ try_again: add_soap_fault(this_ptr, "HTTP", "Unknown protocol. Only http and https are allowed.", NULL, NULL TSRMLS_CC); return FALSE; } + + old_allow_url_fopen = PG(allow_url_fopen); + PG(allow_url_fopen) = 1; if (use_ssl && php_stream_locate_url_wrapper("https://", NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) == NULL) { php_url_free(phpurl); if (request != buf) {efree(request);} - add_soap_fault(this_ptr, "HTTP", "SSL support not available in this build", NULL, NULL TSRMLS_CC); + add_soap_fault(this_ptr, "HTTP", "SSL support is not available in this build", NULL, NULL TSRMLS_CC); + PG(allow_url_fopen) = old_allow_url_fopen; return FALSE; } @@ -367,9 +372,11 @@ try_again: php_url_free(phpurl); if (request != buf) {efree(request);} add_soap_fault(this_ptr, "HTTP", "Could not connect to host", NULL, NULL TSRMLS_CC); + PG(allow_url_fopen) = old_allow_url_fopen; return FALSE; } } + PG(allow_url_fopen) = old_allow_url_fopen; if (stream) { zval **cookies, **login, **password; |