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;
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;
}
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;
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
+ zend_bool old_allow_url_fopen;
/*
xmlInitParser();
*/
+
+ old_allow_url_fopen = PG(allow_url_fopen);
+ PG(allow_url_fopen) = 1;
ctxt = xmlCreateFileParserCtxt(filename);
+ PG(allow_url_fopen) = old_allow_url_fopen;
if (ctxt) {
ctxt->keepBlanks = 0;
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;