|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-11-09 07:34 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
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);