Skip to content

Commit cd55b2d

Browse files
author
John Soo
committed
Fix location url resolution.
1 parent da629e9 commit cd55b2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/001-xml_http_request.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ class XMLHttpRequest extends XMLHttpRequestEventTarget
501501
# Transparent redirection handling.
502502
switch response.statusCode
503503
when 301, 302, 303, 307, 308
504-
@_url = @_parseUrl response.headers['location']
504+
@_url = @_parseUrl (url.resolve @_url['href'], response.headers['location'])
505505
@_method = 'GET'
506506
if 'content-type' of @_loweredHeaders
507507
delete @_headers[@_loweredHeaders['content-type']]

0 commit comments

Comments
 (0)