Browse files

learned how to make encode_base64 not emit an extra newline

  • Loading branch information...
1 parent ffbd045 commit 196773bb6f8916a83c6d354dae7ea7670863540d @beppu committed Apr 9, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 eg/HTTPAuth.pm
View
3 eg/HTTPAuth.pm
@@ -22,8 +22,7 @@ sub authorized {
return undef unless defined $self->env->{HTTP_AUTHORIZATION};
my $auth = $self->env->{HTTP_AUTHORIZATION};
$auth =~ s/Basic\s*//;
- my $login_pass = encode_base64("$CONFIG{login}:$CONFIG{password}");
- chomp($login_pass);
+ my $login_pass = encode_base64("$CONFIG{login}:$CONFIG{password}", '');
if ($auth eq $login_pass) {
return 1;
} else {

0 comments on commit 196773b

Please sign in to comment.