OK, so I think I got to the bottom of this, the issue is actually with 
encoded slashes in the path (not the underscore prefix per-se). Thus:

1) curl -X PUT http://localhost:4985/tests/_local/tester --data '{"foo": 
"bar"}' -H "content-type:application/json"
2) curl -X PUT http://localhost:4985/tests/_local%2Ftester --data '{"foo": 
"bar"}' -H "content-type:application/json"

#1 works in Sync Gateway, whereas #2 does not (returns a 404 error). Both 
forms of the above request work in CouchDB. The same is true of GET calls 
too by the way.

Not sure where you think that leaves the issue Jens. Is it something you'd 
like to fix in Sync Gateway, or do you believe it's an acceptable quirk? I 
can raise an issue if you think it's worth addressing.

For me it's a bit of a pain, because I'm using a third party lib for my 
CouchDB REST calls (dscape/nano), and this URL encoding is governed by that 
component, so I may (or may not, I've not dug into it yet) have to fork 
that to fix the problems that I'm seeing.

Cheers,
Steven



On Friday, 2 May 2014 23:57:49 UTC+10, Jens Alfke wrote:
>
>
> On May 1, 2014, at 10:44 PM, Steven Barlow <[email protected]<javascript:>> 
> wrote:
>
> Attempting to PUT a document with a "_local/" prefixed id fails with an 
> 'unknown URL' error. 
>
>
> That should work (and it’s used by the replicator, so I’m pretty confident 
> it does work.) Can you show me an actual request/response, like a ‘curl’ 
> command or a TCP dump?
>
> —Jens
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/b629fb44-101f-4661-8500-16ebef65adb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to