#30685 [Opn->Asn]: Malformed SOAPClient http header reequest

From: Date: Thu, 04 Nov 2004 14:28:58 +0000
Subject: #30685 [Opn->Asn]: Malformed SOAPClient http header reequest
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68696@lists.php.net to get a copy of this message
 ID:               30685
 Updated by:       derick@php.net
 Reported By:      lagoni at dsw dot dk
-Status:           Open
+Status:           Assigned
 Bug Type:         SOAP related
 Operating System: Fedora Core 2
 PHP Version:      5.0.2
-Assigned To:      
+Assigned To:      dmitry


Previous Comments:
------------------------------------------------------------------------

[2004-11-04 15:16:08] lagoni at dsw dot dk

Description:
------------
Description:
------------
I found a error in the implementation of the http header in the SOAP
extension.
The error also exist in the newest CVS version.

According to the HTTP 1.1 RFC2616, section 3.4:

“HTTP character sets are identified by case-insensitive tokens. The
complete set of tokens is defined by the IANA Character Set
registry[19].

          charset = token
“
The extension is wrapping double quotes around the torken of the
charset tag.

I tried to patch it, and it seems to work:

--- php_http.c.orig	2004-06-22 14:42:17.000000000 +0200
+++ php_http.c	2004-11-04 15:02:48.588726799 +0100
@@ -390,14 +390,14 @@
 */
 			"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");
+			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,"Content-Type: text/xml;
charset=utf-8\r\n");
 			if (soapaction) {
 				smart_str_append_const(&soap_headers, "SOAPAction: \"");
 				smart_str_appends(&soap_headers, soapaction);




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30685&edit=1


Thread (3 messages)

« previous php.bugs (#68696) next »