summaryrefslogtreecommitdiff
path: root/ext/soap/php_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r--ext/soap/php_http.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index c7254e4280..73c72e661b 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -132,16 +132,21 @@ int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *location, char *so
*/
"User-Agent: PHP SOAP 0.1\r\n");
if (soap_version == SOAP_1_2) {
- smart_str_append_const(&soap_headers,"Content-Type: application/soap+xml; charset=\"utf-8\"\r\n");
+ smart_str_append_const(&soap_headers,"Content-Type: application/soap+xml; charset=\"utf-8");
+ if (soapaction) {
+ smart_str_append_const(&soap_headers,"\"; action=\"");
+ smart_str_appends(&soap_headers, soapaction);
+ }
+ smart_str_append_const(&soap_headers,"\"\r\n");
} else {
smart_str_append_const(&soap_headers,"Content-Type: text/xml; charset=\"utf-8\"\r\n");
+ smart_str_append_const(&soap_headers, "SOAPAction: \"");
+ smart_str_appends(&soap_headers, soapaction);
+ smart_str_append_const(&soap_headers, "\"\r\n");
}
smart_str_append_const(&soap_headers,"Content-Length: ");
smart_str_append_long(&soap_headers, buf_size);
- smart_str_append_const(&soap_headers, "\r\n"
- "SOAPAction: \"");
- smart_str_appends(&soap_headers, soapaction);
- smart_str_append_const(&soap_headers, "\"\r\n");
+ smart_str_append_const(&soap_headers, "\r\n");
/* HTTP Authentication */
if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_login", sizeof("_login"), (void **)&login) == SUCCESS) {