Skip to content

Commit 4c49a65

Browse files
author
Anton Reznikov
committed
Fix the set_favicon sub
1 parent e07559d commit 4c49a65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AnyEvent/HTTP/Server.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ sub DESTROY { $_[0]->destroy };
113113

114114
sub set_favicon {
115115
my $self = shift;
116-
if (shift) {
117-
my $icondata = shift;
116+
my $icondata = shift;
117+
if ($icondata) {
118118
$self->{ico} = "HTTP/1.1 200 OK${LF}Connection:close${LF}Content-Type:image/x-icon${LF}Content-Length:".length($icondata)."${LF}${LF}".$icondata;
119119
}
120120
else {

0 commit comments

Comments
 (0)