couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Bartak <>
Subject RE: Creating views using PUT
Date Thu, 20 Nov 2008 21:06:55 GMT
I still haven't found a solution for this issue.  Is anyone else trying to use Couch from .Net?
 Should I file a bug about this?

-----Original Message-----
From: John Bartak
Sent: Tuesday, November 11, 2008 10:28 AM
Subject: RE: Creating views using PUT

I actually already tried to double-escape the url and it didn't work.

For some reason, .Net doesn't unescape the %25 character.  So if you post to a url like http://localhost:5984/somedatabase/_design%252Fmyview,
it will actually post to that exact url and you end up with a document in your database with
an id of "_design%2Fmyview".

-----Original Message-----
From: Alex Chapman []
Sent: Friday, November 07, 2008 11:28 PM
Subject: Re: Creating views using PUT

In my case it turned out that the problem was also my http library
unencoding the '/' before sending the request.

Maybe as a workaround for .Net you could try double-escaping the character
like so: "_design%252fmyview". If you unencode that once, you get

2008/11/8 John Bartak <>

> This is a follow up to the message from Nov 1 entitled "Creating views
> using PUT".
> In a manner similar to the original poster, I'm trying to create a view
> using an HTTP POST request.  I try to post to
> http://localhost:5984/somedatabase/_design/myview, but instead of creating
> a document with an id of "_design/myview", it creates a document with an id
> of "_design", with an attachment called "myview".  The original thread
> discussed encoding "/" between _design and myview as "%2F".
> Unfortunately, this technique doesn't work from .Net.  The .Net Uri object
> (and therefore the HttpWebRequest object) automatically unescapes the URI.
>  There doesn't appear to be any way to change this behavior.
> When we were running CouchDB version 0.9.0a698039 we didn't have to escape
> the slash character.  The latest version (0.9.0a712213) requires this
> escaping.

View raw message