From: Dmitry Stogov Date: Tue, 27 Jan 2004 06:54:14 +0000 (+0000) Subject: Proper handling of SOAPAction in SOAP 1.1 and SOAP 1.2 X-Git-Tag: php-5.0.0b4RC1~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0b60d945f8347656bcbd4e066a2f580dacc5089;p=php Proper handling of SOAPAction in SOAP 1.1 and SOAP 1.2 --- 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) {