Skip Menu |
 

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

Report information
The Basics
Id: 72987
Status: open
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc: DMITRI [...] cpan.org
AdminCc:

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



Subject: Automatic port number selection
Download (untitled) / with headers
text/plain 343b
It would be nice if HTTP::Server::Simple let me start the server on a port selected by the system, so I don’t have to hard-code it or use random number and hope it’s not in use. I’ve found that passing '00' as the port number will accomplish that, but then finding out the number requires delving into HTTP::Server::Simple’s guts.
Download (untitled) / with headers
text/plain 520b
On Mon Dec 05 21:25:33 2011, SPROUT wrote: Show quoted text
> It would be nice if HTTP::Server::Simple let me start the server on a > port selected by the system, > so I don’t have to hard-code it or use random number and hope it’s not > in use. > > I’ve found that passing '00' as the port number will accomplish that, > but then finding out the > number requires delving into HTTP::Server::Simple’s guts. >
BTW, this is what I currently use: my($port) = Socket::sockaddr_in getsockname HTTP::Server::Simple::HTTPDaemon;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.