Bug 66336

Summary: ResourceRequest::doUpdatePlatformRequest() should clear http method
Product: WebKit Reporter: Pratik Solanki <psolanki>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, ddkilzer, psolanki
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 66350    

Description Pratik Solanki 2011-08-16 15:04:56 PDT
In ResourceRequestMac.mm, ResourceRequest::doUpdateResourceRequest() does

    if (NSString* method = [m_nsRequest.get() HTTPMethod])
        m_httpMethod = method;

This means that we don't clear out the m_httpMethod field if (e.g.) the NSURLRequest was nil. This can cause 2 ResourceRequests to be treated as different when they should be equal e.g. if the 2 ResourceRequests were created with different ctors. We have 2 different ResourceRequestBase actor - one sets the httpMethod to "GET" by default, the other doesn't do anything.

By contrast on the CFNetwork side, we always clear out all the fields.