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

Side by Side 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, 1 month 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/responseURL-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 case ResponseTypeLegacyStream: 462 case ResponseTypeLegacyStream:
463 return "legacystream"; 463 return "legacystream";
464 case ResponseTypeStream: 464 case ResponseTypeStream:
465 return "stream"; 465 return "stream";
466 } 466 }
467 return ""; 467 return "";
468 } 468 }
469 469
470 String XMLHttpRequest::responseURL() 470 String XMLHttpRequest::responseURL()
471 { 471 {
472 return m_response.url().string(); 472 KURL responseURL(m_response.url());
473 if (!responseURL.isNull())
474 responseURL.removeFragmentIdentifier();
475 return responseURL.string();
473 } 476 }
474 477
475 XMLHttpRequestUpload* XMLHttpRequest::upload() 478 XMLHttpRequestUpload* XMLHttpRequest::upload()
476 { 479 {
477 if (!m_upload) 480 if (!m_upload)
478 m_upload = XMLHttpRequestUpload::create(this); 481 m_upload = XMLHttpRequestUpload::create(this);
479 return m_upload.get(); 482 return m_upload.get();
480 } 483 }
481 484
482 void XMLHttpRequest::trackProgress(long long length) 485 void XMLHttpRequest::trackProgress(long long length)
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 visitor->trace(m_responseDocument); 1655 visitor->trace(m_responseDocument);
1653 visitor->trace(m_responseDocumentParser); 1656 visitor->trace(m_responseDocumentParser);
1654 visitor->trace(m_progressEventThrottle); 1657 visitor->trace(m_progressEventThrottle);
1655 visitor->trace(m_upload); 1658 visitor->trace(m_upload);
1656 visitor->trace(m_blobLoader); 1659 visitor->trace(m_blobLoader);
1657 XMLHttpRequestEventTarget::trace(visitor); 1660 XMLHttpRequestEventTarget::trace(visitor);
1658 DocumentParserClient::trace(visitor); 1661 DocumentParserClient::trace(visitor);
1659 } 1662 }
1660 1663
1661 } // namespace blink 1664 } // namespace blink
OLDNEW
« 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