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

List:       kfm-devel
Subject:    Re: PATCH: Fix BR# 51185
From:       "Dawit A." <adawit () kde ! org>
Date:       2002-12-01 0:00:56
[Download RAW message or body]

On Saturday 30 November 2002 18:55, Dawit A. wrote:
> Hi,
>
> The following patch fixes the problem reported by BR# 51185.
> Note that it does not deal with the issue of how Content-Location
> affects caching as outlined by section 14.14 of RFC 2616.  That
> requires extra flags and meta-data being sent back to the io-slave.

Of course attaching the patch would help a lot.

Regards,
Dawit A.

["http.cc.diff" (text/x-diff)]

Index: http.cc
===================================================================
RCS file: /home/kde/kdelibs/kioslave/http/http.cc,v
retrieving revision 1.552
diff -u -p -b -B -w -r1.552 http.cc
--- http.cc	2002/11/26 21:33:38	1.552
+++ http.cc	2002/11/30 23:48:04
@@ -2735,6 +2735,11 @@ bool HTTPProtocol::readHeader()
     else if (strncasecmp(buf, "Content-length:", 15) == 0) {
       m_iSize = STRTOLL(trimLead(buf + 15), 0, 10);
     }
+    
+    else if (strncasecmp(buf, "Content-location:", 17) == 0) {
+      setMetaData ("content-location",
+                   QString::fromLatin1(trimLead(buf+17)).stripWhiteSpace());
+    }   
 
     // what type of data do we have?
     else if (strncasecmp(buf, "Content-type:", 13) == 0) {

["khtml.diff" (text/x-diff)]

Index: khtml_part.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtml_part.cpp,v
retrieving revision 1.772
diff -u -p -b -B -w -r1.772 khtml_part.cpp
--- khtml_part.cpp	2002/11/29 21:51:06	1.772
+++ khtml_part.cpp	2002/11/30 23:48:39
@@ -1110,6 +1110,12 @@ void KHTMLPart::slotData( KIO::Job* kio_
       }
       d->m_bHTTPRefresh = true;
     }
+    
+    // Support Content-Location per section 14.14 of RFC 2616.
+    QString baseURL = d->m_job->queryMetaData ("content-location");
+    if (!baseURL.isEmpty())
+      d->m_doc->setBaseURL(d->m_doc->completeURL(baseURL));
+
 
     if ( !m_url.isLocalFile() ) {
         // Support for http last-modified


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

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