Skip Menu |

This queue is for tickets about the POE-Component-Server-HTTP CPAN distribution.

Report information
The Basics
Id: 6747
Status: resolved
Priority: 0/
Queue: POE-Component-Server-HTTP

People
Owner: Nobody in particular
Requestors: rcaputo [...] pobox.com
Cc:
AdminCc:

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



Date: Thu, 24 Jun 2004 12:20:45 -0400
From: Rocco Caputo <rcaputo [...] pobox.com>
To: bug-POE-Component-Server-HTTP [...] rt.cpan.org
Subject: non-http input crashes the component
This trivial test server crashes when given non-HTML input: #!/usr/bin/perl use strict; use warnings; use POE qw( Component::Server::HTTP ); use HTTP::Status; my $httpd = POE::Component::Server::HTTP->new( Port => 9000, ContentHandler => { '/' => \&index, }, ); $poe_kernel->run(); exit; sub index { my ($request, $response) = @_; $response->code(RC_OK); $response->header(Content_type => 'text/plain'); $response->content("hello, world!"); return RC_OK; } The input: 1) poerbook:~% nc localhost 9000 moocow 1) poerbook:~% The crash output: 1) poerbook:~/projects/support% perl oh8gdv-httpd.perl Can't call method "scheme" on an undefined value at /sw/perl/584-multi/site-lib/POE/Component/Server/HTTP.pm line 226. -- Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/