Permalink
Browse files

FIX: Switch the regex to match html redirection to case insensitive a…

…nd match any numbers in the attribute content before ";".
  • Loading branch information...
1 parent e125ae3 commit 290fe4cd123ea69df214ca1ff4906f45b627171d @lbdremy committed Feb 3, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/browser.js
View
2 lib/browser.js
@@ -83,7 +83,7 @@ function getRequest(options,callback){
});
res.on('end',function(){
// Check if a HTTP refresh/redirection is present into the HTML page, if yes refreshes/redirects.
- var matches = body.match(/<meta[ ]*http-equiv="REFRESH"[ ]*content="0;[ ]*URL=(.*?)"[ ]*\/?>/);
+ var matches = body.match(/<meta[ ]*http-equiv="REFRESH"[ ]*content="[0-9]{1,};[ ]*URL=(.*?)"[ ]*\/?>/i);
if(matches && matches[1]){
options.url = matches[1];
return getRequest(options,callback);

0 comments on commit 290fe4c

Please sign in to comment.