[
https://issues.apache.org/jira/browse/COUCHDB-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087909#comment-13087909
]
Christopher Bonhage commented on COUCHDB-1229:
----------------------------------------------
I disagree with this being a "Won't Fix". I am of the opinion that the _show
handler has correct behavior here (and by extension, that the _update handler's
swallowing of slashes in docids is incorrect behavior). The patch supplied
above just duplicates the docid extraction routine from handle_doc_show_req/3
to handle_doc_update_req/3.
My couchapps use slashes in docids to namespace documents, allowing me to use
rewrite rules to force _show, _update, and _list handlers to only handle
documents in a specified namespace. If slashes are not allowed in docids, this
would not be possible (and would be a massive showstopper for me).
That being said, I do encounter some woes when it comes to trying to get
attachments out of namespaced documents with rewrite rules (there's no way
around escaping the %2F there), but that has nothing to do with the behavior of
_show and _update handlers.
> _update handler doesn't support slashes in doc _id
> --------------------------------------------------
>
> Key: COUCHDB-1229
> URL: https://issues.apache.org/jira/browse/COUCHDB-1229
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Affects Versions: 1.1
> Reporter: Simon Leblanc
> Labels: URI, id, update
> Attachments: COUCHDB-1229.patch
>
>
> Let's say you have:
> - a doc with _id foo/bar
> - a show function named baz
> - a update function named baz
> Then _show/baz/foo/bar is valid but _update/baz/foo/bar is not. Only
> _update/baz/foo%2Fbar works.
> This is particularly annoying when you want to rewrite /something/* to
> _update/baz/foo/* (rewriting /something/* to _show/baz/foo/* works perfectly).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira