[Webkit-unassigned] [Bug 133483] [Curl] Empty headers in request response.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 6 09:12:24 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=133483





--- Comment #11 from peavo at outlook.com  2014-06-06 09:12:46 PST ---
(In reply to comment #9)
> (From update of attachment 232573 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232573&action=review
> 

Thanks for reviewing :)

> I think this looks good, but it could be made a bit tighter.
> 
> > Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:48
> > +CurlCacheEntry::CurlCacheEntry(const String& url, ResourceHandle* job, const String& cacheDir)
> 
> This could be a reference...
> 
> > Source/WebCore/platform/network/curl/CurlCacheEntry.h:64
> > +    const ResourceHandle* getJob() const { return m_job; }
> 
> This could then return a reference...
> 
> > Source/WebCore/platform/network/curl/CurlCacheEntry.h:80
> > +    ResourceHandle* m_job;
> 
> This could just be a const reference, since m_job doesn't appear to be allowed to be null, does it?
> 

I left this as is, since m_job will be null if the entry is loaded from disc, there will be no associated job then.

> > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:142
> > +        std::unique_ptr<CurlCacheEntry> cacheEntry = std::make_unique<CurlCacheEntry>(url, nullptr, m_cacheDir);
> 
> auto cacheEntry!
> 
> > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:213
> > +        HashMap<String, std::unique_ptr<CurlCacheEntry>>::iterator it = m_index.find(url);
> 
> This would be better as auto to avoid having to type all that stuff out.
> 
> > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:219
> > +        std::unique_ptr<CurlCacheEntry> cacheEntry = std::make_unique<CurlCacheEntry>(url, job, m_cacheDir);
> 
> auto cacheEntry
> 
> > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:230
> > +void CurlCacheManager::didFinishLoading(ResourceHandle* job)
> 
> Make this a ResourceHandle& ...
> 
> > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:236
> > +        return;
> 
> ... and get rid of this null check!
> 
> > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:276
> > +void CurlCacheManager::didReceiveData(ResourceHandle* job, const char* data, size_t size)
> 

Done.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list