Skip Menu |

This queue is for tickets about the Net-OpenDHT CPAN distribution.

Report information
The Basics
Id: 33264
Status: new
Priority: 0/
Queue: Net-OpenDHT

People
Owner: Nobody in particular
Requestors: leon [...] astray.com
Cc:
AdminCc:

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



Subject: Port
Adrien Krunch Kunysz <adrien@kunysz.be> says: The gateway port is hardcoded, thus disallowing the user to choose an alternative port. Attached is a patch that let the user choose the gateway port.
Subject: OpenDHT-choose-port.diff
diff -urp Net-OpenDHT-0.33.old/lib/Net/OpenDHT.pm Net-OpenDHT-0.33/lib/Net/OpenDHT.pm --- Net-OpenDHT-0.33.old/lib/Net/OpenDHT.pm 2007-08-06 15:35:36.000000000 +0200 +++ Net-OpenDHT-0.33/lib/Net/OpenDHT.pm 2007-08-06 15:35:46.000000000 +0200 @@ -37,7 +37,9 @@ sub _make_request_aux { my ( $self, $xml ) = @_; my $server = $self->server || die "No server"; - my $request = HTTP::Request->new( POST => "http://$server:5851/" ); + my $request = HTTP::Request->new( POST => + $server =~ /^http:\/\// ? $server : "http://$server:5851/" + ); $request->header( Content_Type => 'text/xml' ); $request->protocol('HTTP/1.0'); $request->content($xml);