Changeset 28569 in webkit
- Timestamp:
- Dec 8, 2007 4:32:55 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r28568 r28569 1 2007-12-08 Kevin Ollivier <kevino@theolliviers.com> 2 3 Reviewed by Alp Toker. 4 5 http://bugs.webkit.org/show_bug.cgi?id=14651 6 [CURL] didReceiveResponse() only called for HTTP loads 7 8 http://bugs.webkit.org/show_bug.cgi?id=14583 9 [GDK] file:// relative CSS include URLs handled incorrectly 10 11 Make sure CURL sets the ResourceResponse URL and calls 12 didReceiveResponse for local files too. 13 14 * platform/network/curl/ResourceHandleManager.cpp: 15 (WebCore::writeCallback): 16 1 17 2007-12-08 Oliver Hunt <oliver@apple.com> 2 18 -
trunk/WebCore/platform/network/curl/ResourceHandleManager.cpp
r28070 r28569 95 95 return totalSize; 96 96 97 // since the code in headerCallback will not have run for local files 98 // the code to set the URL and fire didReceiveResponse is never run, 99 // which means the ResourceLoader's response does not contain the URL. 100 // Run the code here for local files to resolve the issue. 101 // TODO: See if there is a better approach for handling this. 102 if (!d->m_response.responseFired()) { 103 const char* hdr; 104 err = curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr); 105 d->m_response.setUrl(KURL(hdr)); 106 if (d->client()) 107 d->client()->didReceiveResponse(job, d->m_response); 108 d->m_response.setResponseFired(true); 109 } 110 97 111 if (d->client()) 98 112 d->client()->didReceiveData(job, static_cast<char*>(ptr), totalSize, 0); … … 162 176 if (client) 163 177 client->didReceiveResponse(job, d->m_response); 178 d->m_response.setResponseFired(true); 179 164 180 } else { 165 181 int splitPos = header.find(":"); -
trunk/WebCore/platform/network/curl/ResourceResponse.h
r27714 r28569 35 35 public: 36 36 ResourceResponse() 37 : ResourceResponseBase(false) 37 : ResourceResponseBase(false), 38 m_responseFired(false) 38 39 { 39 40 } 40 41 41 42 ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename) 42 : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename) 43 : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename), 44 m_responseFired(false) 43 45 { 44 46 } 47 48 void setResponseFired(bool fired) { m_responseFired = fired; } 49 bool responseFired() { return m_responseFired; } 45 50 46 51 private: … … 50 55 { 51 56 } 57 58 bool m_responseFired; 52 59 53 60 };
Note: See TracChangeset
for help on using the changeset viewer.