diff options
| author | Dmitry Stogov <dmitry@php.net> | 2004-01-27 06:54:14 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2004-01-27 06:54:14 +0000 |
| commit | b0b60d945f8347656bcbd4e066a2f580dacc5089 (patch) | |
| tree | 8b6fe27a462dfaa790f725e786b3d344712a0ed7 /ext/soap/php_http.c | |
| parent | 4cc62a06f61314354a1eca8b15efae3ff98caac5 (diff) | |
| download | php-git-b0b60d945f8347656bcbd4e066a2f580dacc5089.tar.gz | |
Proper handling of SOAPAction in SOAP 1.1 and SOAP 1.2
Diffstat (limited to 'ext/soap/php_http.c')
| -rw-r--r-- | ext/soap/php_http.c | 15 |
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) { |
