Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-1002867 into 
lp:zorba.

Requested reviews:
  David Graf (davidagraf)
Related bugs:
  Bug #1002867 in Zorba: "resulting base64 in http-client is wrong"
  https://bugs.launchpad.net/zorba/+bug/1002867

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/bug-1002867/+merge/106855

No longer setting the charset of an overridden media type to a default value.
-- 
https://code.launchpad.net/~paul-lucas/zorba/bug-1002867/+merge/106855
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_parser.cpp'
--- modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_parser.cpp	2012-05-10 04:12:09 +0000
+++ modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_parser.cpp	2012-05-22 16:46:23 +0000
@@ -41,8 +41,7 @@
   std::string::size_type pos = s.find( ';' );
   *mime_type = s.substr( 0, pos );
 
-  // The HTTP/1.1 spec says that the default charset is ISO-8859-1.
-  *charset = "ISO-8859-1";
+  charset->clear();
 
   if ( pos != std::string::npos ) {
     //
@@ -109,7 +108,8 @@
 
       std::auto_ptr<std::istream> lStream;
       try {
-        if ( transcode::is_necessary( theCurrentCharset.c_str() ) ) {
+        if ( !theCurrentCharset.empty() &&
+             transcode::is_necessary( theCurrentCharset.c_str() ) ) {
           lStream.reset(
             new transcode::stream<std::istream>(
               theCurrentCharset.c_str(), theStreamBuffer

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to