You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/08/26 11:09:32 UTC

[GitHub] [couchdb] harish1992 opened a new issue #2144: Using `+` in a document `_id`

harish1992 opened a new issue #2144: Using `+` in a document `_id`
URL: https://github.com/apache/couchdb/issues/2144
 
 
   While creating document, should `+` sign be percent encoded in `id`?
   
   consider this:
   
   Document creation:
   
   ` curl -H 'Content-Type: application/json' -X POST http://127.0.0.1:5984/kitura_test_db -d '{"id": "123+456","key": "123+456"}' `
   
   Response: 
   
      `{ "ok":true,"id":"fd848ff548334259626e95c9f7010b7c","rev":"1-13e6d186ed0ff9a304acf9e00c6778da"}`
   
   The document get created successfully.
   
   Document retrieval:
   
   `  curl http://127.0.0.1:5984/kitura_test_db/123+456  `
   
   Response:
   
   `{"error":"not_found","reason":"missing"}`
   
   Whereas the request:
   
   `curl http://127.0.0.1:5984/kitura_test_db/123%2B456`
   
   Response:
   
   `{"_id":"123+456","_rev":"1-34d19d1d466727d25183f2553b6c4a80","favorited":false,"value":"value1","truncated":false,"created_at":"Tue Aug 28 21:16:23 +0000 2012"}`
   
   Does retrieval require the `id` to be percent encoded? if so, is this documented somewhere? since `+` allowed character in `url` 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services