Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 58ef323

Browse files
committed
fix($location): fix URL interception in hash-bang mode
Closes #1051
1 parent 59bfe8e commit 58ef323

File tree

4 files changed

+186
-206
lines changed

4 files changed

+186
-206
lines changed

src/ng/http.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function isSameDomain(requestUrl, locationUrl) {
5252
relativeProtocol: match[2] === undefined || match[2] === ''
5353
};
5454

55-
match = URL_MATCH.exec(locationUrl);
55+
match = SERVER_MATCH.exec(locationUrl);
5656
var domain2 = {
5757
protocol: match[1],
5858
host: match[3],

src/ng/httpBackend.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument,
117117

118118
function completeRequest(callback, status, response, headersString) {
119119
// URL_MATCH is defined in src/service/location.js
120-
var protocol = (url.match(URL_MATCH) || ['', locationProtocol])[1];
120+
var protocol = (url.match(SERVER_MATCH) || ['', locationProtocol])[1];
121121

122122
// fix status code for file protocol (it's always 0)
123123
status = (protocol == 'file') ? (response ? 200 : 404) : status;

0 commit comments

Comments
 (0)