Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: ilmari+cpan [...] ilmari.org
Cc:
AdminCc:

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



Subject: [PATCH] Pass parameter hash to Plack's server_ready callback
Otherwise, plackup can't tell the user where to connect to.
Subject: 0001-Pass-parameter-hash-to-Plack-s-server_ready-callback.patch
From 60cd0a3cb8c326533c857f973dc952e075ffb938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org> Date: Tue, 17 Dec 2013 17:20:39 +0000 Subject: [PATCH] Pass parameter hash to Plack's server_ready callback Otherwise, plackup can't tell the user where to connect to. --- lib/Plack/Handler/Net/Async/HTTP/Server.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Plack/Handler/Net/Async/HTTP/Server.pm b/lib/Plack/Handler/Net/Async/HTTP/Server.pm index 2e9cb98..c1de9ed 100644 --- a/lib/Plack/Handler/Net/Async/HTTP/Server.pm +++ b/lib/Plack/Handler/Net/Async/HTTP/Server.pm @@ -84,7 +84,13 @@ sub run socktype => "stream", queuesize => $queuesize, - on_notifier => sub { $self->{server_ready} and $self->{server_ready}->() }, + on_notifier => sub { + $self->{server_ready}->({ + host => $host, + port => $service, + server_software => ref($self), + }) if $self->{server_ready}; + }, on_resolve_error => sub { die "Cannot resolve - $_[-1]\n"; -- 1.8.5
Thanks. Applied with formatting updates and docs. Will be in next version -- Paul Evans
Released in 0.06 -- Paul Evans