Bug 66336 - ResourceRequest::doUpdatePlatformRequest() should clear http method
Summary: ResourceRequest::doUpdatePlatformRequest() should clear http method
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 66350
  Show dependency treegraph
 
Reported: 2011-08-16 15:04 PDT by Pratik Solanki
Modified: 2011-08-17 09:43 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.