[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kioslave/http
From: Harri Porten <porten () kde ! org>
Date: 2007-10-13 21:26:46
Message-ID: 1192310806.932595.16505.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 724928 by porten:
ported Allen's r717341 fix from the 3.5 branch
M +6 -6 http.cpp
M +2 -2 http.h
--- trunk/KDE/kdelibs/kioslave/http/http.cpp #724927:724928
@@ -2564,10 +2564,10 @@
// Send the response header if it was requested
if ( config()->readEntry("PropagateHttpHeader", false) )
{
- setMetaData("HTTP-Headers", m_responseHeader);
+ setMetaData("HTTP-Headers", m_responseHeaders.join("\n"));
sendMetaData();
}
- m_responseHeader.clear();
+ m_responseHeaders.clear();
}
/**
@@ -2584,7 +2584,7 @@
// Check
if (m_request.bCachedRead)
{
- m_responseHeader = QString::fromLatin1("HTTP-CACHE");
+ m_responseHeaders << QLatin1String("HTTP-CACHE");
forwardHttpResponseHeader();
// Read header from cache...
@@ -2670,9 +2670,9 @@
int maxAge = -1; // -1 = no max age, 0 already expired, > 0 = actual time
int maxHeaderSize = 64*1024; // 64Kb to catch DOS-attacks
- // read in 4096 bytes at a time (HTTP cookies can be quite large.)
+ // read in 8192 bytes at a time (HTTP cookies can be quite large.)
int len = 0;
- char buffer[4097];
+ char buffer[8193];
bool cont = false;
bool cacheValidated = false; // Revalidation was successful
bool mayCache = true;
@@ -2773,7 +2773,7 @@
// Store the the headers so they can be passed to the
// calling application later
- m_responseHeader += QString::fromLatin1(buf);
+ m_responseHeaders << QString::fromLatin1(buf);
if ((strncasecmp(buf, "HTTP", 4) == 0) ||
(strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support
--- trunk/KDE/kdelibs/kioslave/http/http.h #724927:724928
@@ -480,7 +480,7 @@
KIO::filesize_t m_iContentLeft; // # of content bytes left
QByteArray m_bufReceive; // Receive buffer
char m_lineBuf[1024];
- char m_rewindBuf[4096];
+ char m_rewindBuf[8192];
size_t m_rewindCount;
size_t m_lineCount;
size_t m_lineCountUnget;
@@ -499,7 +499,7 @@
//--- Settings related to a single response only
bool m_bRedirect; // Indicates current request is a redirection
- QString m_responseHeader; // All response headers
+ QStringList m_responseHeaders; // All headers
// Language/Encoding related
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic