Skip Menu |

This queue is for tickets about the Net-Async-HTTP-Server CPAN distribution.

Report information
The Basics
Id: 101503
Status: resolved
Priority: 0/
Queue: Net-Async-HTTP-Server

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.07
Fixed in: 0.09



Subject: Body of "0" fails to work
$ plackup -s Net::Async::HTTP::Server -e"sub { [ 200, [ 'Content-Type' => 'text/plain' ], ['0'] ] }" ... $ wget -O - http://localhost:5000/ --2015-01-12 17:56:13-- http://localhost:5000/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:5000... connected. HTTP request sent, awaiting response... 200 OK Length: 1 [text/plain] Saving to: ‘STDOUT’ - 0%[ ] 0 --.-KB/s ^C $ telnet localhost 5000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 HTTP/1.1 200 OK Content-Length: 1 Content-Type: text/plain ^C^] Show quoted text
telnet> quit
Connection closed. -- Paul Evans
Fixed. -- Paul Evans
Subject: rt101503.patch
=== modified file 'lib/Net/Async/HTTP/Server/Request.pm' --- lib/Net/Async/HTTP/Server/Request.pm 2015-09-09 14:21:43 +0000 +++ lib/Net/Async/HTTP/Server/Request.pm 2015-09-09 14:34:47 +0000 @@ -236,7 +236,7 @@ my $self = shift; my ( $stream ) = @_; - while( my $next = shift @{ $self->{pending} } ) { + while( defined( my $next = shift @{ $self->{pending} } ) ) { $stream->write( $next, $self->protocol eq "HTTP/1.0" ? ( on_flush => sub { $stream->close } ) :