Skip Menu |

This queue is for tickets about the AnyEvent-HTTPD CPAN distribution.

Report information
The Basics
Id: 44625
Status: resolved
Priority: 0/
Queue: AnyEvent-HTTPD

People
Owner: Nobody in particular
Requestors: mathieu [...] closetwork.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: 0.5



Subject: patch for specifying the host to the tcpserver
Here's a patch for supporting the "host" parameter, which gets passed to tcp_server. I didn't want a public web server, just a localhost one, and that was the only way to do it. Index: C:/Documents and Settings/mlongtin/My Documents/dbpro/svn/branches/newscheduler/lib/AnyEvent/HTTPD/HTTPServer.pm =================================================================== --- C:/Documents and Settings/mlongtin/My Documents/dbpro/svn/branches/newscheduler/lib/AnyEvent/HTTPD/HTTPServer.pm (revision 383) +++ C:/Documents and Settings/mlongtin/My Documents/dbpro/svn/branches/newscheduler/lib/AnyEvent/HTTPD/HTTPServer.pm (revision 384) @@ -36,7 +36,7 @@ my $self = { @_ }; bless $self, $class; - tcp_server undef, $self->{port}, sub { + tcp_server $self->{host}, $self->{port}, sub { my ($fh) = @_; unless ($fh) { $self->event (error => "couldn't accept client: $!"); Index: C:/Documents and Settings/mlongtin/My Documents/dbpro/svn/branches/newscheduler/lib/AnyEvent/HTTPD.pm =================================================================== --- C:/Documents and Settings/mlongtin/My Documents/dbpro/svn/branches/newscheduler/lib/AnyEvent/HTTPD.pm (revision 383) +++ C:/Documents and Settings/mlongtin/My Documents/dbpro/svn/branches/newscheduler/lib/AnyEvent/HTTPD.pm (revision 384) @@ -95,6 +95,11 @@ =over 4 +=item host => $host + +The TCP address of the HTTP server will listen on. Usually 0.0.0.0 (the +default), for a public server, or 127.0.0.1 for a local server. + =item port => $port The TCP port the HTTP server will listen on.
Subject: Re: [rt.cpan.org #44625] patch for specifying the host to the tcpserver
Date: Sun, 29 Mar 2009 18:19:23 +0200
To: Mathieu Longtin via RT <bug-AnyEvent-HTTPD [...] rt.cpan.org>
From: Robin Redeker <elmex [...] ta-sa.org>
On Fri, Mar 27, 2009 at 10:51:16AM -0400, Mathieu Longtin via RT wrote: Show quoted text
> Fri Mar 27 10:51:15 2009: Request 44625 was acted upon. > Transaction: Ticket created by yulmathieu > Queue: AnyEvent-HTTPD > Subject: patch for specifying the host to the tcpserver > Broken in: 0.04 > Severity: Normal > Owner: Nobody > Requestors: mathieu@closetwork.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44625 > > > > Here's a patch for supporting the "host" parameter, which gets passed to > tcp_server. I didn't want a public web server, just a localhost one, and > that was the only way to do it.
Thanks for the patch, I've applied it to my repository and it will be included in the next release. -- Robin Redeker | Deliantra, the free code+content MORPG elmex@ta-sa.org / r.redeker@gmail.com | http://www.deliantra.net http://www.ta-sa.org/ |
This patch has been added and is available in version 0.5 now. Greetings, Robin