Closed skaurus closed 12 years ago
Hi, what browser and version of Mojolicious are you using? Do any of the Digest module's test cases fail?
Thanks
Hi, Recent Firefox, Mojo 2.09 or something. Mojo changed some of its uri methods to not include leading slash sometimes ago, maybe around 1.40-1.50 versions. No, tests didn't fail by this mean... but they fail when machine locale different from English, so error messages in different language too :)
I think I see a problem, not sure if it's what you're seeing, Given:
use strict;
use warnings;
use Mojolicious::Lite;
plugin 'digest_auth', allow => { sshaw => 'password' };
get '/xxx' => sub {
my $self = shift;
#return unless $self->digest_auth;
$self->render(text=><<TXT);
URL: "${ \$self->req->url }"
Mojolicious: $Mojolicious::VERSION
TXT
};
app->start;
Examples:
# http://localhost/, OK
URL: "/" Mojolicious: 2.11
# http://localhost//, This would be a problem
URL: "" Mojolicious: 2.11
This should also be fixed in Mojo too.
If this isn't what you're seeing then... Can you provide a test case that fails? What's the HTTP response code you receive?
Are you experiencing this with GET
requests..?
Thanks
Hi, this should be fixed in this commit:
Hi,
thanks for effort and sorry that we could not run further testing.
We'll test it as soon as it be available on CPAN.
$self->_request->url returns url without leading slash, but browser send in "Authorization:" header url WITH leading slash. So here's fix. Provided by https://github.com/gibbon4ik