On Mon, 17 May 2004 10:50:26 -0700, John Hardin wrote:

>� Are (unescaped or unencoded) backslashes even *valid* in URLs?

Quotes from RFC 1738 (URLs):

--8<--
Other characters are unsafe because
gateways and other transport agents are known to sometimes modify
such characters. These characters are "{", "}", "|", "\", "^", "~",
"[", "]", and "`".
--8<--
All unsafe characters must always be encoded within a URL.
--8<--
3.1. Common Internet Scheme Syntax
//<user>:<password>@<host>:<port>/<url-path>
--8<--
The url-path syntax depends on the scheme being used, as does the
manner in which it is interpreted.
--8<--
An HTTP URL takes the form:

      http://<host>:<port>/<path>?<searchpart>
--8<--
Within the <path> and <searchpart> components, "/", ";", "?" are
   reserved.  The "/" character may be used within HTTP to designate a
   hierarchical structure.
--8<--

So, using a "\" instead of a "/" to separate levels in a hierarchy is perfectly 
legal, but the "\" has to be encoded.

Note 1: RFC 1738 doesn't seem to reference the common convetion of "MUST" and 
"SHOULD", so I'm not really sure what a "should" means in it (or a "must" ftm).
Note 2: I just skimmed the RFC. Actually reading it may give a different result.

/Jonas
--
Jonas Eckerman, [EMAIL PROTECTED]
http://www.fsdb.org/

Reply via email to