Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 95084 invoked from network); 10 Sep 2010 03:18:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Sep 2010 03:18:01 -0000 Received: (qmail 23459 invoked by uid 500); 10 Sep 2010 03:18:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 23198 invoked by uid 500); 10 Sep 2010 03:17:58 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 23190 invoked by uid 99); 10 Sep 2010 03:17:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Sep 2010 03:17:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Sep 2010 03:17:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8A3HWt6028789 for ; Fri, 10 Sep 2010 03:17:33 GMT Message-ID: <2729368.107821284088652925.JavaMail.jira@thor> Date: Thu, 9 Sep 2010 23:17:32 -0400 (EDT) From: "Muharem Hrnjadovic (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-883) Wrong document returned due to incorrect URL decoding In-Reply-To: <15785781.75821283954732788.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907868#action_12907868 ] Muharem Hrnjadovic commented on COUCHDB-883: -------------------------------------------- FWIW, an URL like http://localhost/a+b is left alone by apache2 i.e. I see the following entry in /var/log/apache2/access.log: 127.0.0.1 - - [10/Sep/2010:05:13:30 +0200] "GET /a+b HTTP/1.1" 200 294 "-" Also, a file with that name (a+b) is served correctly. > Wrong document returned due to incorrect URL decoding > ----------------------------------------------------- > > Key: COUCHDB-883 > URL: https://issues.apache.org/jira/browse/COUCHDB-883 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.0.1 > Environment: Kubuntu 10.4, Firefox 3.6.8 > Reporter: Taras Puchko > > I have two documents in my database: "a b" and "a+b". The first can be retrieved via "/mydb/a%20b" and the second via "/mydb/a%2Bb". > When I enter "/mydb/a b" in the browser it automatically encodes it so the correct document is returned. But when I enter "/mydb/a+b" the URL is sent intact since "+" is a valid character in a path segment according to [1]. The problem is that "GET /mydb/a+b" makes CouchDB return the document with id "a b" and not the intended one, which is against the URI spec . > For an informal description of URL encoding one may refer to [2]. > [1]: http://www.ietf.org/rfc/rfc2396.txt > [2]: http://www.lunatech-research.com/archives/2009/02/03/what-every-web-developer-must-know-about-url-encoding -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.