Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 360336836 for ; Mon, 20 Jun 2011 14:34:09 +0000 (UTC) Received: (qmail 67704 invoked by uid 500); 20 Jun 2011 14:34:08 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 67619 invoked by uid 500); 20 Jun 2011 14:34:08 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 67524 invoked by uid 99); 20 Jun 2011 14:34:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 14:34:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 14:34:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8E6AD424BDC for ; Mon, 20 Jun 2011 14:33:47 +0000 (UTC) Date: Mon, 20 Jun 2011 14:33:47 +0000 (UTC) From: "David Buchmann (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <506898236.20767.1308580427580.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (JCR-2997) Invalid search result path encoding for nodes with spaces in node names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Invalid search result path encoding for nodes with spaces in node names ----------------------------------------------------------------------- Key: JCR-2997 URL: https://issues.apache.org/jira/browse/JCR-2997 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-spi2dav Affects Versions: 2.2.7 Reporter: David Buchmann Priority: Minor when using the davex remoting protocol, search for nodes with "_x0020 " in the name fails. Credentials sc = new SimpleCredentials("admin","admin".toCharArray()); Session s = repository.login(sc,workspace); Node n = s.getRootNode(); n.addNode("Test _x0020 fail", "nt:unstructured"); System.out.println(n.hasNode("Test _x0020_ fail")); s.save(); s = repository.login(sc,workspace); n = s.getRootNode(); System.out.println(n.hasNode("Test _x0020 fail")); // => true NodeIterator ni = n.getNodes("Test _x0020 fail"); System.out.println(ni.getSize()); // value > 0, increasing for each run QueryManager qm = s.getWorkspace().getQueryManager(); Query query = qm.createQuery("SELECT * FROM [nt:unstructured]", Query.JCR_SQL2); QueryResult result = query.execute(); NodeIterator iter = result.getNodes(); while ( iter.hasNext() ) { Node row = iter.nextNode(); System.out.println(row.getPath()); // the node is not in the result set. } looking at the traffic that goes over the wire, i see that the _ is not properly escaped while sending data over the network (but spaces are encoded with the convention for export document view. other non-xml characters are urlencoded, which makes more sense) jcr:path /Test_x0020__x0020_x0020_fail nt:unstructured this results in a request for the following url, which is of course not found. (there is no way to find out whether the above path means "_x0020 " or " _x0020_") GET /server/tests/jcr%3aroot/tests_general_base/index.txt/jcr%3acontent/Test%20escaping%20x0020_bla%20%3c%3e'%22%20node.0.json probably the search result should encode spaces as %20? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira