create new tag
, view all tags

Bug: TWiki::Net Can't getUrl from vhosts

If the server is a vhosts, then the TWiki::Net::getUrl doesn't work. Because it's not obey the RFC2068, the http request should be :

<http://www.w3.org/pub/WWW/> MUST include:

GET /pub/WWW/ HTTP/1.1

Host: www.w3.org

so, the TWiki::Net should changed from:

my $req = "GET http://$theHost$theUrl HTTP/1.1\r\n";


my $req = "GET $theUrl HTTP/1.1\r\n";

at line 59.

Test case


TWiki version: TWikiBeta 03 Aug 2002
TWiki plugins:  
Server OS: Linux
Web server: Apache
Perl version: 5.6
Client OS:  
Web Browser:  

-- SimonLei - 22 Oct 2002

Follow up

Fix record

Fixed, in TWikiAlphaRelease and TWiki.org. Note that an INCLUDE of a URL does not work here since SF blocks outgoing traffic.

-- PeterThoeny - 10 Nov 2002

I have reopened this bug since the "fix" does NOT actually work in the general case - it will at best only work with some very old HTTP/1.1 vhost servers.

The original poster's report whilst correct for HTTP/1.1 is ONLY correct for HTTP/1.1 capable clients. TWiki is not an HTTP/1.1 capable client and the bug fix that was applied actually exacerbates TWiki's remote include handing.

Whilst the following request is correct for an HTTP/1.1 client it is wholly inappropriate for TWiki's net client code - which isn't actually even HTTP/1.0 compliant.

GET /pub/WWW/ HTTP/1.1
Host: www.w3.org

The reason for this is the HTTP/1.1 tells the server that the client is capable of recieving HTTP/1.1 responses and as such MUST be capable of coping with ChunkedTransferEncoding. TWiki is NOT capable of this and hence MUST NOT send an HTTP/1.1 tag, and SHOULD send an HTTP/1.0 request tag instead. Using HTTP/1.1 header fields is a 100% valid thing to do since it is valid for a client to send an HTTP/1.1 request stating that it expects and HTTP/1.0 response.

See rfc:2268, ProxiedIncludesBrokenImplementationBug and ChunkedTransferEncoding for more details.

(MUSTs are in used in the RFC manner of MUST/SHOULD/MAY)

The bug fix for this is attached to ProxiedIncludesBrokenImplementationBug .

-- MS - 28 Aug 2003, 19 Dec 2003

Who should this be assigned to?

-- SamHasler - 20 Apr 2004

The classification for this topic is BugResolved, but there is no information about when/how. Is twiki wholly HTTP 1.1 compliant now?

nevermind, I should have read ProxiedIncludesBrokenImplementationBug first -- MattWilkie - 03 Jan 2005

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2005-01-03 - MattWilkie
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.