W3C home > Mailing lists > Public > www-talk@w3.org > May to June 2006

Using slash character in path segments

From: S. Mike Dierken <mike@dierken.com>
Date: Mon, 29 May 2006 01:17:30 +0000
Message-Id: <200605280536.k4S5aHWx015940@searchalert.net>
To: "'REST Discuss'" <rest-discuss@yahoogroups.com>
Cc: <www-talk@w3.org>




I have a question about using user-supplied data in a http URI that has a
forward slash character ('/' - the path separator). I would like to place
this data in the path portion of the URI, rather than a query term. Is this
simply not possible, a bad idea or just troublesome due to encoding issues?

For example, we are defining service APIs in a pure HTTP that accept product
keys (a SKU) that can contain most any character. I'd like to use paths
rather than query terms (for no particular reason) and was wondering how to
support data with a '/' character.

>From RFC3986 "If data for a URI component would conflict with a reserved
character's purpose as a delimiter, then the conflicting data must be
percent-encoded before the URI is formed." it seems that we merely need to
instruct client applications to encode the user supplied data according to
path-segment encoding rules (in this case, percent encoding of the slash
character).

Has anyone done this and if so, what issues have they found?
Received on Monday, 29 May 2006 20:36:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:29 GMT