David Dorward wrote:
Aatu Koskensilta wrote:
Ah. That seems sensible. Are there syntactical restrictions on the form
the scheme component of an URI can take? Otherwise "r/sx/*-http" could
name a (unregistered) scheme.
===== rfc 2396 ==========
3. URI Syntactic Components
The URI syntax is dependent upon the scheme. In general, absolute
URI are written as follows:
<scheme>:<scheme-specific-part>
An absolute URI contains the name of the scheme being used (<scheme>)
followed by a colon (":") and then a string (the <scheme-specific-
part>) whose interpretation depends on the scheme.
=========================
http://www.ietf.org/rfc/rfc2396.txt
In URIs, the scheme is indicated by it ending in a colon. I believe the
colon in the above URI should be encoded as %3A
Probably yes. The RFC specifies the following grammar for <scheme>
<scheme> := alpha *( alpha | digit | "+" | "-" | "." )
I've added a check to see that a potential scheme conforms to this
grammar to my processing scripts.
Another very strange thing about the Yahoo web site is that as a result
of submitting a search query we get a 320 Found reply with the Location
header field having value
http://search/?p=searchstring&sub=Search&fr=fp-top
or something on the lines. I don't think this conforms to the HTTP/1.1
specification, which says that the Location-header field should contain
an absolute URL. Apparently browsers can guess what Yahoo means by this
but I'm at loss.
--
Aatu Koskensilta (aa**************@xortec.fi)
"Wovon man nicht sprechen kann, daruber muss man schweigen"
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus