Subject: | Net::HTTP::Methods: Host header problems |
Net::HTTP::Methods
# $Id: Methods.pm,v 1.15 2004/11/12 10:42:36 gisle Exp $
Some webserver configuration's don't understand the port number in the "Host:" header if it is the default port number(80).
--- Methods.pm Mon Apr 25 16:06:20 2005
+++ Methods.pm.org Mon Apr 25 16:13:36 2005
@@ -47,9 +47,9 @@
return undef unless $self->http_connect($cnf);
- unless ($host =~ /:/ || $self->peerport == $self->http_default_port) {
- my $p = $self->peerport;
- $host .= ":$p";
+ unless ($host =~ /:/) {
+ my $p = $self->peerport;
+ $host .= ":$p";
}
$self->host($host);