Bug: TWiki::Net::getUrl should send thePort in Host: header
INCLUDEd http server cannot know the vhost port.
Suggested Patch
--- Net.pm~ 2004-10-13 14:11:16.140625000 +0200
+++ Net.pm 2004-10-13 14:14:06.640625000 +0200
@@ -70,7 +70,7 @@
my $req = "GET $theUrl HTTP/1.0\r\n";
# RNF 22 Jan 2002 Support for vhosts and user authentication.
- $req .= "Host: $theHost\r\n";
+ $req .= "Host: $theHost:$thePort\r\n";
if( $theUser && $thePass ) {
# Use MIME::Base64 at run-time if using outbound proxy with
# authentication
@@ -84,7 +84,7 @@
my $proxyHost = &TWiki::Prefs::getPreferencesValue("PROXYHOST");
my $proxyPort = &TWiki::Prefs::getPreferencesValue("PROXYPORT");
if($proxyHost && $proxyPort) {
- $req = "GET http://$theHost$theUrl HTTP/1.0\r\n";
+ $req = "GET http://$theHost:$thePort$theUrl HTTP/1.0\r\n";
$theHost = $proxyHost;
$thePort = $proxyPort;
}
Test case
INCLUDing a locally set-up ZWiki produced links without proper port numbers.
Environment
| TWiki version: |
TWikiRelease01Sep2004 |
| TWiki plugins: |
(pre-installed) |
| Server OS: |
Windows XP |
| Web server: |
Apache 2.0.52 mod_perl/1.99_16 |
| Perl version: |
5.8.4 |
| Client OS: |
Windows XP |
| Web Browser: |
FireFox 1.0PR |
--
KaoruMaeda - 13 Oct 2004
Follow up
I changed the
WebForm to
PatchProposal. Also, attach the diff file.
--
KaoruMaeda - 26 Oct 2004
Fix record
Patch applied to DEVELOP codebase - rev 1784. Thanks Kaoru!
--
CrawfordCurrie - 26 Oct 2004