|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30685 Malformed SOAPClient http header reequest
Submitted: 2004-11-04 15:16 UTC Modified: 2004-11-09 07:34 UTC
From: lagoni at dsw dot dk Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.0.2 OS: Fedora Core 2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
21 + 22 = ?
Subscribe to this entry?

 [2004-11-04 15:16 UTC] lagoni at dsw dot dk
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);
 		} 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);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-09 07:34 UTC]
Fixed in CVS PHP_5_0 and HEAD.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 09:03:36 2021 UTC