From 470286ecfe79d59df14944e5b5d34630fc739391 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 22 Nov 2012 09:09:45 +0100 Subject: Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485) Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66 Reviewed-by: Simon Hausmann --- Source/WebKit/win/WebMutableURLRequest.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'Source/WebKit/win/WebMutableURLRequest.cpp') diff --git a/Source/WebKit/win/WebMutableURLRequest.cpp b/Source/WebKit/win/WebMutableURLRequest.cpp index a22f732ab..f52f79eb3 100644 --- a/Source/WebKit/win/WebMutableURLRequest.cpp +++ b/Source/WebKit/win/WebMutableURLRequest.cpp @@ -186,10 +186,12 @@ HRESULT STDMETHODCALLTYPE WebMutableURLRequest::HTTPMethod( } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::HTTPShouldHandleCookies( - /* [retval][out] */ BOOL* /*result*/) + /* [retval][out] */ BOOL* result) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + bool shouldHandleCookies = m_request.allowCookies(); + + *result = shouldHandleCookies ? TRUE : FALSE; + return S_OK; } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::initWithURL( @@ -264,11 +266,11 @@ HRESULT STDMETHODCALLTYPE WebMutableURLRequest::isEqual( // IWebMutableURLRequest -------------------------------------------------------- HRESULT STDMETHODCALLTYPE WebMutableURLRequest::addValue( - /* [in] */ BSTR /*value*/, - /* [in] */ BSTR /*field*/) + /* [in] */ BSTR value, + /* [in] */ BSTR field) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + m_request.addHTTPHeaderField(WTF::AtomicString(value, SysStringLen(value)), String(field, SysStringLen(field))); + return S_OK; } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setAllHTTPHeaderFields( @@ -314,10 +316,10 @@ HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setHTTPShouldHandleCookies( } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setMainDocumentURL( - /* [in] */ BSTR /*theURL*/) + /* [in] */ BSTR theURL) { - ASSERT_NOT_REACHED(); - return E_NOTIMPL; + m_request.setFirstPartyForCookies(MarshallingHelpers::BSTRToKURL(theURL)); + return S_OK; } HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setTimeoutInterval( -- cgit v1.2.1