summaryrefslogtreecommitdiff
path: root/ext/soap/php_http.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-05-20 16:55:03 +0000
committerDmitry Stogov <dmitry@php.net>2004-05-20 16:55:03 +0000
commit38ef28e41b9c57e826d6d494cd9ebbcbfcc9e13e (patch)
treef8bc70ad0ca26c92b7b9ca83deebb611802ed9aa /ext/soap/php_http.c
parentaf2aa721dfc2e5065e7764d54fb687381342b29b (diff)
downloadphp-git-38ef28e41b9c57e826d6d494cd9ebbcbfcc9e13e.tar.gz
Allowing user defined SOAP transports with SoapClient::__doRequest()
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r--ext/soap/php_http.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index d41874b9ed..cfe0f7ac4c 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -186,11 +186,11 @@ static int in_domain(const char *host, const char *domain)
}
}
-int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *location, char *soapaction, int soap_version TSRMLS_DC)
+int send_http_soap_request(zval *this_ptr, char *buf, int buf_size, char *location, char *soapaction, int soap_version TSRMLS_DC)
{
- xmlChar *buf, *request;
+ char *request;
smart_str soap_headers = {0};
- int buf_size, request_size, err;
+ int request_size, err;
php_url *phpurl = NULL;
php_stream *stream;
zval **trace, **tmp;
@@ -210,16 +210,6 @@ int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *location, char *so
stream = NULL;
}
- xmlDocDumpMemory(doc, &buf, &buf_size);
- if (!buf) {
- add_soap_fault(this_ptr, "HTTP", "Error build soap request", NULL, NULL TSRMLS_CC);
- return FALSE;
- }
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- Z_LVAL_PP(trace) > 0) {
- add_property_stringl(this_ptr, "__last_request", buf, buf_size, 1);
- }
-
if (location != NULL && location[0] != '\000') {
phpurl = php_url_parse(location);
}
@@ -494,7 +484,7 @@ int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *location, char *so
}
if (request != buf) {efree(request);}
- xmlFree(buf);
+
return TRUE;
}
@@ -790,10 +780,6 @@ int get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRMLS
*buffer = http_body;
*buffer_len = http_body_size;
}
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- Z_LVAL_PP(trace) > 0) {
- add_property_stringl(this_ptr, "__last_response", *buffer, *buffer_len, 1);
- }
efree(http_headers);
return TRUE;