Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 61938 invoked from network); 11 Nov 2008 18:28:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2008 18:28:15 -0000 Received: (qmail 12826 invoked by uid 500); 11 Nov 2008 18:28:17 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 12795 invoked by uid 500); 11 Nov 2008 18:28:17 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 12775 invoked by uid 99); 11 Nov 2008 18:28:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 10:28:17 -0800 X-ASF-Spam-Status: No, hits=-2.5 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of john.bartak@autodesk.com designates 198.102.112.48 as permitted sender) Received: from [198.102.112.48] (HELO paste.autodesk.com) (198.102.112.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 18:26:57 +0000 Received: from smtp.mgd.autodesk.com ([65.54.1.156]) by paste.autodesk.com (8.14.1/8.12.6) with ESMTP id mABIRdxN027962 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 11 Nov 2008 10:27:39 -0800 (PST) Received: from ADSK-NAMSG-02.MGDADSK.autodesk.com ([65.54.1.155]) by ADSK-TK5MHUB-01.MGDADSK.autodesk.com ([65.54.1.156]) with mapi; Tue, 11 Nov 2008 10:27:39 -0800 From: John Bartak To: "couchdb-user@incubator.apache.org" Date: Tue, 11 Nov 2008 10:27:38 -0800 Subject: RE: Creating views using PUT Thread-Topic: Creating views using PUT Thread-Index: AclEJsr1TvPJT40KSzCxWy/4O555gAAAzUvg Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org 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 t= o 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 dat= abase with an id of "_design%2Fmyview". -----Original Message----- From: Alex Chapman [mailto:chapman.alex@gmail.com] Sent: Friday, November 07, 2008 11:28 PM To: couchdb-user@incubator.apache.org 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 "_design%2fmyview". 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 creatin= g > 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 objec= t > (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 escap= e > the slash character. The latest version (0.9.0a712213) requires this > escaping. > >