Skip to content

Commit 341423f

Browse files
committed
Trim trailing \r from status line so message() doesn't return it.
Issue #87
1 parent b7c38e8 commit 341423f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/HTTP/Response.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ sub parse
3030
$str = "";
3131
}
3232

33+
$status_line =~ s/\r\z//;
34+
3335
my $self = $class->SUPER::parse($str);
3436
my($protocol, $code, $message);
3537
if ($status_line =~ /^\d{3} /) {

0 commit comments

Comments
 (0)