diff options
author | Steve Block <steveblock@google.com> | 2010-03-24 16:27:17 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-03-24 18:10:52 +0000 |
commit | 6a6881a3ff408ab630684ae1779f12b83a024044 (patch) | |
tree | 045241dcb27c57cb5dd472a3d7d3307f9e0ae596 /WebCore/platform | |
parent | 03f19ba76488b3a62011e106d1fd65e076e52837 (diff) | |
download | external_webkit-6a6881a3ff408ab630684ae1779f12b83a024044.zip external_webkit-6a6881a3ff408ab630684ae1779f12b83a024044.tar.gz external_webkit-6a6881a3ff408ab630684ae1779f12b83a024044.tar.bz2 |
Fixes XHR requests to use the username and password supplied from JavaScript
Currently, the browser does not use the credentials supplied from JavaScript.
If a request returns a 401 Unauthorized, the browser always prompts the user.
This violates http://www.w3.org/TR/XMLHttpRequest/#the-send-method
Bug: 2533522
Change-Id: Ic232003a3f321167810fc7263d6ecb654eeeb5eb
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/network/android/ResourceHandleAndroid.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/WebCore/platform/network/android/ResourceHandleAndroid.cpp b/WebCore/platform/network/android/ResourceHandleAndroid.cpp index 6759852..aadf43b 100644 --- a/WebCore/platform/network/android/ResourceHandleAndroid.cpp +++ b/WebCore/platform/network/android/ResourceHandleAndroid.cpp @@ -158,7 +158,11 @@ void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, SyncLoader s(error, response, data); ResourceHandle h(request, &s, false, false, false); // This blocks until the load is finished. - ResourceLoaderAndroid::start(&h, request, frame->loader()->client(), false, true); + // Use the request owned by the ResourceHandle. This has had the username + // and password (if present) stripped from the URL in + // ResourceHandleInternal::ResourceHandleInternal(). This matches the + // behaviour in the asynchronous case. + ResourceLoaderAndroid::start(&h, h.getInternal()->m_request, frame->loader()->client(), false, true); } } // namespace WebCore |