Skip Menu |

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

Report information
The Basics
Id: 21076
Status: open
Priority: 0/
Queue: Net-UPnP

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

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



Subject: getposturl clobbers supplied ctrl_url
You can supply your own ctrl_url to Service::getposturl but it's replaced by getcontrolurl(). Here's a patch. --- CPAN/Net/UPnP/Service.pm (revision 9049) +++ CPAN/Net/UPnP/Service.pm (working copy) @@ -137,7 +137,7 @@ $location_url = $dev->getlocation(); $url_base = $dev->geturlbase(); - $ctrl_url = $this->getcontrolurl(); + $ctrl_url ||= $this->getcontrolurl(); #print "$location_url\n"; #print "$url_base\n";
Actually I think the real problem I was having was caused by something else: if (defined($3) && 0 < length($3)) { $ctrl_url = "http:\/\/" . $1 . ":" . $2 . $ctrl_url; } else { $ctrl_url = "http:\/\/" . $1 . ":" . $2 . "\/" . $ctrl_url; } If you've got a $location_url that includes path info, the ctrl_url will be missing a forward slash. Wouldn't you always want to use the ctrl_url from the second half of this statement, that includes the forward slash after $2?