Package: libhttp-server-simple-perl
Version: 0.44-1
Severity: normal

Dear Maintainer,

I use an overriden version of the module Net::Server::Fork as net_server.
This module uses the ssl-protocol in combination with IPv4.
In the function handle_request it is now not possible to determine the 
ip-address and tcp-port of the client.

This problem can be fixed with the following patch on 
/usr/share/perl5/HTTP/Server/Simple.pm:

@@ -386,6 +387,12 @@
         my $remote_sockaddr = getpeername( $self->stdio_handle );
         my ( $iport, $iaddr ) = $remote_sockaddr ? 
sockaddr_in($remote_sockaddr) : (undef,undef);
         my $peeraddr = $iaddr ? ( inet_ntoa($iaddr) || "127.0.0.1" ) : 
'127.0.0.1';
+        my $server = shift;
+        if ($server && $server->{'server'}) {
+            $self->{'server'} = $server->{'server'};
+            $peeraddr = $self->{'server'}->{'peeraddr'} if 
($self->{'server'}->{'peeraddr'});
+            $iport = $self->{'server'}->{'peerport'} if 
($self->{'server'}->{'peerport'});
+        }
         
         my ( $method, $request_uri, $proto ) = $self->parse_request;


The changes make it possible to use the peeraddr and peerport from
Net::Server, which are passed to the process_request function since version
2.000.




-- System Information:
Debian Release: 7.8
  APT prefers stable-updatee
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libhttp-server-simple-perl depends on:
ii  perl  5.14.2-21+deb7u2

libhttp-server-simple-perl recommends no packages.

libhttp-server-simple-perl suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to