You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2009/03/13 18:53:39 UTC
svn commit: r753328 -
/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
Author: angela
Date: Fri Mar 13 17:53:30 2009
New Revision: 753328
URL: http://svn.apache.org/viewvc?rev=753328&view=rev
Log:
JCR-2018 Jcr-Remoting: PathNotFoundException if item name ends with .json
Modified:
jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java?rev=753328&r1=753327&r2=753328&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java Fri Mar 13 17:53:30 2009
@@ -673,13 +673,18 @@
if (locator instanceof WrappingLocator && ((WrappingLocator)locator).isJsonRequest) {
// check if the .json extension has been correctly interpreted.
Session s = sessionImpl.getRepositorySession();
- if (s.itemExists(((WrappingLocator)locator).loc.getRepositoryPath())) {
- // an item exists with the original calculated repo-path
- // -> assume that the repository item path ends with .json
- // or .depth.json. i.e. .json wasn't an extra extension
- // appended to request the json-serialization of the node.
- // -> change the flag in the WrappingLocator correspondingly.
- ((WrappingLocator) locator).isJsonRequest = false;
+ try {
+ if (s.itemExists(((WrappingLocator)locator).loc.getRepositoryPath())) {
+ // an item exists with the original calculated repo-path
+ // -> assume that the repository item path ends with .json
+ // or .depth.json. i.e. .json wasn't an extra extension
+ // appended to request the json-serialization of the node.
+ // -> change the flag in the WrappingLocator correspondingly.
+ ((WrappingLocator) locator).isJsonRequest = false;
+ }
+ } catch (RepositoryException e) {
+ // if the unmodified repository path isn't valid (e.g. /a/b[2].5.json)
+ // -> ignore.
}
}
return super.getItem(sessionImpl, locator);