RFC2616 references RFC2396 as a source of information about URI in the
description of a general syntax (Chapter 3.2.1). Then the next chapter
(3.2.2) specifies the http URL which /must/ start with the "http:" scheme.
In my opinion, a HTTP client should not handle URL not starting with the
HTTP scheme altough a browser may do it because a browser support many
schemes, and probably default to the http: scheme if none is given (check
that with a network sniffer).
By the way, in which real situation are you confronted with URL without
scheme ?
--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
-----Message d'origine-----
From: RTT
Sent: Thursday, October 27, 2011 9:01 PM
To: ICS support mailing
Subject: Re: [twsocket] THTTPCli fail to resolve URLs that start with "//"
On 27-10-2011 19:28, Francois PIETTE wrote:
If I'm wrong, please point me to the exact text in the /HTTP/ standard
(RFC2616).
From RFC2396, that merge RFC1808 with two others, and that is
referenced in the RFC2616.
------------------------------------------------------------------------
absoluteURI = scheme ":" ( hier_part | opaque_part )
URI that are hierarchical in nature use the slash "/" character for
separating hierarchical components. For some file systems, a "/"
character (used to denote the hierarchical structure of a URI) is the
delimiter used to construct a file name hierarchy, and thus the URI
path will look similar to a file pathname. This does NOT imply that
the resource is a file or that the URI maps to an actual filesystem
pathname.
hier_part = ( net_path | abs_path ) [ "?" query ]
net_path = "//" authority [ abs_path ]
abs_path = "/" path_segments
------------------------------------------------------------------------
The syntax for relative URI takes advantage of the <hier_part> syntax
of <absoluteURI> (Section 3) in order to express a reference that is
relative to the namespace of another hierarchical URI.
relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ]
A relative reference beginning with two slash characters is termed a
network-path reference, as defined by <net_path> in Section 3. Such
references are rarely used.
------------------------------------------------------------------------
So, for this error in particular, seems to be a relative URI, in the
"net_path" form.
I haven't investigated if this form of relative (quasi absolute, except
for the unknown scheme) URI is valid as start URI, but browsers accept
it without problem.
But seems to be valid in a relocation, where relative URIs have to be
handled.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be