[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kioslave/http
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2010-12-05 1:16:22
Message-ID: 20101205011622.10A37AC8A4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1203664 by adawit:
- Use the content-type metadata sent by the client regardless of request method.
- Append "Content-Type:" if it is missing from the meta-data sent by the client.
BUG:253867
M +5 -4 http.cpp
--- trunk/KDE/kdelibs/kioslave/http/http.cpp #1203663:1203664
@@ -2438,17 +2438,18 @@
if (!cookieStr.isEmpty())
header += cookieStr + QLatin1String("\r\n");
- QString customHeader = metaData( QLatin1String("customHTTPHeader") );
+ const QString customHeader = metaData( QLatin1String("customHTTPHeader") );
if (!customHeader.isEmpty())
{
header += sanitizeCustomHTTPHeader(customHeader);
header += QLatin1String("\r\n");
}
- QString contentType = metaData(QLatin1String("content-type"));
- if ((m_request.method == HTTP_POST || m_request.method == HTTP_PUT)
- && !contentType.isEmpty())
+ const QString contentType = metaData(QLatin1String("content-type"));
+ if (!contentType.isEmpty())
{
+ if (!contentType.startsWith(QLatin1String("content-type"), Qt::CaseInsensitive))
+ header += QLatin1String("Content-Type:");
header += contentType;
header += QLatin1String("\r\n");
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic