Skip to content

Commit

Permalink
handle leading and trailing dots
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 13, 2015
1 parent 08d5f42 commit 3374566
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent/CookieJar.pm
Expand Up @@ -100,7 +100,7 @@ sub find {
}

# Remove another part
continue { $domain =~ s/^[^.]+\.*// }
continue { $domain =~ s/^[^.]*\.*// }

return \@found;
}
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/cookiejar.t
Expand Up @@ -256,7 +256,7 @@ $tx->req->url->parse('http://mojolicio.us/whatever');
$jar->prepare($tx);
is $tx->req->cookie('foo'), undef, 'no cookie';
$tx = Mojo::Transaction::HTTP->new;
$tx->req->url->parse('http://manydots...');
$tx->req->url->parse('http://...many...dots...');
$jar->prepare($tx);
is $tx->req->cookie('foo'), undef, 'no cookie';

Expand Down

0 comments on commit 3374566

Please sign in to comment.