Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1203)

Unified Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 681513003: XMLHttpRequest.responseURL should exclude url fragment (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: After editing the test case. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/responseURL-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index 03f4ee76bc6974be96338ece9b63ee3e41f7708e..8764c90e7e655ecd10b4156c0e8a8906c86a152b 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -469,7 +469,10 @@ String XMLHttpRequest::responseType()
String XMLHttpRequest::responseURL()
{
- return m_response.url().string();
+ KURL responseURL(m_response.url());
+ if (!responseURL.isNull())
+ responseURL.removeFragmentIdentifier();
+ return responseURL.string();
}
XMLHttpRequestUpload* XMLHttpRequest::upload()
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/responseURL-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698