Permalink
Browse files

Add a fake SERVER_NAME and SERVER_PORT in case it's binding on UNIX s…

…ocket. Fixes #24
  • Loading branch information...
1 parent c53a6b4 commit b8df07a9083fea30e9ad52a18761b0e067c66ec9 @miyagawa committed Jun 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Starman/Server.pm
@@ -176,8 +176,8 @@ sub process_request {
my $env = {
REMOTE_ADDR => $self->{server}->{peeraddr},
REMOTE_HOST => $self->{server}->{peerhost} || $self->{server}->{peeraddr},
- SERVER_NAME => $self->{server}->{sockaddr}, # XXX: needs to be resolved?
- SERVER_PORT => $self->{server}->{sockport},
+ SERVER_NAME => $self->{server}->{sockaddr} || 0, # XXX: needs to be resolved?
+ SERVER_PORT => $self->{server}->{sockport} || 0,
SCRIPT_NAME => '',
'psgi.version' => [ 1, 1 ],
'psgi.errors' => *STDERR,

1 comment on commit b8df07a

@dypsilon

Thank you for this fix.

Please sign in to comment.