[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kioslave/http
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2007-09-01 17:30:23
Message-ID: 1188667823.143320.25742.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 707381 by adawit:

BACKPORT: fix for correctly propagating HTTP response headers > 4K

 M  +8 -5      http.cc  
 M  +1 -1      http.h  


--- branches/KDE/3.5/kdelibs/kioslave/http/http.cc #707380:707381
@@ -263,11 +263,11 @@
   m_bChunked = false;
   m_iSize = NO_SIZE;
 
-  m_responseHeader.clear();
   m_qContentEncodings.clear();
   m_qTransferEncodings.clear();
   m_sContentMD5 = QString::null;
   m_strMimeType = QString::null;
+  m_responseHeader = QString::null;
 
   setMetaData("request-id", m_request.id);
 }
@@ -2647,10 +2647,13 @@
   // Send the response header if it was requested
   if ( config()->readBoolEntry("PropagateHttpHeader", false) )
   {
-    setMetaData("HTTP-Headers", m_responseHeader.join("\n"));
+    setMetaData("HTTP-Headers", m_responseHeader);
     sendMetaData();
+    //kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::forwardHttpResponseHeader =====" << endl;
+    //kdDebug(7113) << "(" << m_pid << m_responseHeader << endl;
   }
-  m_responseHeader.clear();
+
+  m_responseHeader = QString::null;
 }
 
 /**
@@ -2667,7 +2670,7 @@
   // Check
   if (m_request.bCachedRead)
   {
-     m_responseHeader << "HTTP-CACHE";
+     m_responseHeader = QString::fromLatin1("HTTP-CACHE");
      // Read header from cache...
      char buffer[4097];
      if (!fgets(buffer, 4096, m_request.fcache) )
@@ -2840,7 +2843,7 @@
 
     // Store the the headers so they can be passed to the
     // calling application later
-    m_responseHeader << QString::fromLatin1(buf);
+    m_responseHeader += QString::fromLatin1(buf);
 
     if ((strncasecmp(buf, "HTTP", 4) == 0) ||
         (strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support
--- branches/KDE/3.5/kdelibs/kioslave/http/http.h #707380:707381
@@ -475,7 +475,7 @@
   bool m_bEOD;
 
 //--- Settings related to a single response only
-  QStringList m_responseHeader; // All headers
+  QString m_responseHeader; // All response headers
   KURL m_redirectLocation;
   bool m_bRedirect; // Indicates current request is a redirection
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic