[ 
https://issues.apache.org/jira/browse/COUCHDB-883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907983#action_12907983
 ] 

Taras Puchko commented on COUCHDB-883:
--------------------------------------

Sebastian, "reserved" does NOT mean that a character must be encoded in all 
parts of a URL.

2.2. Reserved Characters
Characters in the "reserved" set are not reserved in all contexts. The set of 
characters actually reserved within any given URI component is defined by that 
component. In general, a character is reserved if the semantics of the URI 
changes if the character is replaced with its escaped US-ASCII encoding.

3.3. Path Component
segment       = *pchar *( ";" param )
pchar         = unreserved | escaped | ":" | "@" | "&" | "=" | "+" | "$" | ","
The path may consist of a sequence of path segments separated by a single slash 
"/" character.
Within a path segment, the characters "/", ";", "=", and "?" are reserved. 



> Wrong document returned due to incorrect URL decoding
> -----------------------------------------------------
>
>                 Key: COUCHDB-883
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-883
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>         Environment: Kubuntu 10.4, Firefox 3.6.8
>            Reporter: Taras Puchko
>
> I have two documents in my database: "a b" and "a+b". The first can be 
> retrieved via "/mydb/a%20b" and the second via "/mydb/a%2Bb".
> When I enter "/mydb/a b" in the browser it automatically encodes it so the 
> correct document is returned. But when I enter "/mydb/a+b" the URL is sent 
> intact since "+" is a valid character in a path segment according to [1]. The 
> problem is that "GET /mydb/a+b" makes CouchDB return the document with id "a 
> b" and not the intended one, which is against the URI spec .
> For an informal description of URL encoding one may refer to [2].
> [1]: http://www.ietf.org/rfc/rfc2396.txt
> [2]: 
> http://www.lunatech-research.com/archives/2009/02/03/what-every-web-developer-must-know-about-url-encoding

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to