| Summary: | [Curl] Sometimes incomplete or empty content can be loaded from cache. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | peavo | ||||||||
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | alex.christensen, bfulgham, commit-queue, stavila | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
peavo
2014-09-16 05:43:16 PDT
Created attachment 238177 [details]
Patch
Comment on attachment 238177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238177&action=review > Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:75 > + return m_isLoading; This method could now become const. Created attachment 238184 [details]
Patch
(In reply to comment #2) > (From update of attachment 238177 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=238177&action=review > > > Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:75 > > + return m_isLoading; > > This method could now become const. Thanks :) Updated patch. Comment on attachment 238184 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238184&action=review This looks mostly good. r- only because it needs another patch and I have a question. > Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:119 > + if (buffer.size() > 0) is buffer.size() signed? I think this should just be if (buffer.size()). > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:221 > + cacheEntry->setIsLoading(true); This not only sets the loading flag, but it calls openContentFile. Is this intentional? Created attachment 238189 [details]
Patch
(In reply to comment #5) > (From update of attachment 238184 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=238184&action=review > > This looks mostly good. r- only because it needs another patch and I have a question. > Thanks for the review :) I have updated the patch. > > Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:119 > > + if (buffer.size() > 0) > > is buffer.size() signed? I think this should just be if (buffer.size()). > > > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:221 > > + cacheEntry->setIsLoading(true); > > This not only sets the loading flag, but it calls openContentFile. Is this intentional? Yes, when there are responses with only headers, and no content, we need to create the content file (which will be empty). Otherwise it will never be created since we never receive any content data. When another request for the same url tries to retrieve the content data from the cache, the file will not exist, and the request will fail. Comment on attachment 238189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238189&action=review > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:221 > + cacheEntry->setIsLoading(true); Why is this line added here? Should it be added in other places? Did it work without this? Comment on attachment 238189 [details]
Patch
Oh, ok.
Comment on attachment 238189 [details] Patch Clearing flags on attachment: 238189 Committed r173666: <http://trac.webkit.org/changeset/173666> All reviewed patches have been landed. Closing bug. |