Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Handle case where server provides a (redirected) Location for a resou…
Browse files Browse the repository at this point in the history
…rce that isn't actually redirected.
  • Loading branch information
Jan Miksovsky committed May 12, 2014
1 parent 7f4c829 commit 58bb22e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
receive: function(url, elt, err, resource, redirectedUrl) {
this.cache[url] = resource;
var $p = this.pending[url];
if ( redirectedUrl ) {
if ( redirectedUrl && redirectedUrl !== url ) {
this.cache[redirectedUrl] = resource;
$p = $p.concat(this.pending[redirectedUrl]);
}
Expand All @@ -125,7 +125,7 @@
this.tail();
}
this.pending[url] = null;
if ( redirectedUrl ) {
if ( redirectedUrl && redirectedUrl !== url ) {
this.pending[redirectedUrl] = null;
}
},
Expand Down

0 comments on commit 58bb22e

Please sign in to comment.