Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 32330 invoked from network); 17 May 2009 13:53:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 May 2009 13:53:09 -0000 Received: (qmail 9460 invoked by uid 500); 17 May 2009 13:53:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9373 invoked by uid 500); 17 May 2009 13:53:08 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 9363 invoked by uid 99); 17 May 2009 13:53:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 May 2009 13:53:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.221.111 as permitted sender) Received: from [209.85.221.111] (HELO mail-qy0-f111.google.com) (209.85.221.111) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 May 2009 13:52:57 +0000 Received: by qyk9 with SMTP id 9so1675642qyk.13 for ; Sun, 17 May 2009 06:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=5QA30ZzObYHjhzeg27A+ztjqEY1xOUCQdw/b0QKX/sI=; b=et+HitvBTJwbWPFZgEJRToPuz00gnTq2ZPsl7U9XA0Hx5VF2rhutWdJw9IKuaM4v61 6GKbINozhWRoqS30lEnxkHB+2PWqIMWhchwFDceZDxgkri5jK1H09EOerNLwSGEbwQtN QIzQhpdsuB7WyiBxwF614s0Z4aq+tsc43/us4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=mb3qThcZ5D7VzHEOVvk3JuvJLC+noRGLMHy+vYnKwC34HQHyUKIVTrZq1iZm4CUrXf 6hOlIa1O8neupohvLd52l5AunvqWppnfd1nXCM7ymsgCA9cg5ZGutd+YubCqRT3tMtoY 8D7s0RL1If9jtr+KAZgCUSbOFenI02EMaSEqI= Received: by 10.224.54.132 with SMTP id q4mr5516663qag.221.1242568356678; Sun, 17 May 2009 06:52:36 -0700 (PDT) Received: from ?10.0.1.2? (c-66-31-20-188.hsd1.ma.comcast.net [66.31.20.188]) by mx.google.com with ESMTPS id 7sm986121qwf.5.2009.05.17.06.52.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 May 2009 06:52:35 -0700 (PDT) Sender: Adam Kocoloski Message-Id: <1A0D7347-FC8A-4FCA-9277-B99DBAA29E32@apache.org> From: Adam Kocoloski To: user@couchdb.apache.org In-Reply-To: <4A0FC837.9040009@griffinbyteworks.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: URL encoding issue Date: Sun, 17 May 2009 09:52:32 -0400 References: <4A0FC837.9040009@griffinbyteworks.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org Hi Kai, I don't think the URL-encoded double quotes are your problem. I just tried encoding all the double-quotes with curl and it worked fine -- even when using a compound key and a string as the first element of that key. If you can write up a reproducible test case that shows unexpected behavior I'm sure someone here can take a crack at it. Best, Adam P.S. you missed a leading double-quote in your first query string. Could it be that simple? On May 17, 2009, at 4:17 AM, Kai Griffin - Relaxing wrote: > Hi, > These past few weeks, I've been re-building our flagship product as > a Flex application, with couchdb as the back end, and this has been > progressing really well. However, I've hit a strange snag, to do > with URL encoding. Flex's HTTPService component automatically url- > encodes requests, so that... > > ....? > startkey=["SYD","LAX","2008-01-01T00:00:00Z"]&endkey=["SYD","LAX", > 2008-01-01T23:59:59Z"] > > becomes... > > ....?startkey=[%22SYD%22,%22LAX%22,%222008-01-01T00:00:00Z > %22]&endkey=[%22SYD%22,%22LAX%22,....etc....] > > that is, when I look at the Erlang console after the request has > been sent from Flex, I see the request with quotes encoded as %22's > as shown above when issued from Flex. > > The trouble is, couchdb fails to return any rows when those quotes > are encoded as %22's like that. When I issue the exact same request > in curl, the quotes are not automatically encoded (they still show > as quotes in Erlang's console), and I get the correct result set for > the view. I always use group=true, so that's not the difference. > > What is particularly strange to me, is that a different design/view > I have works perfectly with the following key: > > ....?startkey=[911,%222008-01-01T00:00:00Z%22]&...etc > > In this case, the first item in the key is an unquoted integer, but > couchdb is still fine with the quoted date, and correctly returns a > result from either Flex or curl. > > Any suggestions from a kind soul out there? > > Cheers, > Kai