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

List:       kde-commits
Subject:    KDE/kdelibs/kio/kio
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2010-11-30 15:44:29
Message-ID: 20101130154429.A29C6AC8A3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1202372 by adawit:

- Enclosed literal character with QLatin1Char.
- Commented code to prevent any ambiguity.

 M  +3 -1      accessmanagerreply_p.cpp  


--- trunk/KDE/kdelibs/kio/kio/accessmanagerreply_p.cpp #1202371:1202372
@@ -119,7 +119,7 @@
         // Set the raw header information...
         const QString headers = job->queryMetaData("HTTP-Headers");
         if (!headers.isEmpty()) {
-            const QStringList httpHeaders (headers.split('\n'));
+            const QStringList httpHeaders (headers.split(QLatin1Char('\n')));
             Q_FOREACH(const QString& httpHeader, httpHeaders) {
                 int index = httpHeader.indexOf(QLatin1Char(':'));
                 if (index == -1)
@@ -129,6 +129,8 @@
                 // Skip setting cookies since they are automatically handled by kio_http...
                 if (headerName.startsWith("set-cookie", Qt::CaseInsensitive))
                     continue;
+                // Without overridding the corrected mime-type sent by kio_http, add
+                // back the "charset=" portion of the content-type header if present.
                 if (headerName.startsWith("content-type", Qt::CaseInsensitive)) {
                     const QString mimeType = header(QNetworkRequest::ContentTypeHeader).toString();
                     if (!headerValue.contains(mimeType, Qt::CaseInsensitive)) {
[prev in list] [next in list] [prev in thread] [next in thread] 

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