Not sure if this is a bug or I'm doing something incorrectly. Here's the
scenario:
* SpringBeanRouter with a Directory attached to it (/resource linked to
/home/user/resourceDirectory on filesystem)
* File named foo.bar.js located at /home/user/resourceDirectory/foo.bar.js
* Performing a GET on /resource/foo.bar.js results in a 404
After digging through code, I made the following change to
DirectoryServerResource.java that seems to have fixed the bug for me. Proposed
patch...
Index:
modules/org.restlet/src/org/restlet/engine/local/DirectoryServerResource.java
===================================================================
---
modules/org.restlet/src/org/restlet/engine/local/DirectoryServerResource.java
(revision 6055)
+++
modules/org.restlet/src/org/restlet/engine/local/DirectoryServerResource.java
(working copy)
@@ -738,7 +738,7 @@
baseEntryName = fullEntryName;
// Remove the extensions from the base name
- firstDotIndex = fullEntryName.indexOf('.');
+ firstDotIndex = fullEntryName.lastIndexOf('.');
if (firstDotIndex != -1) {
baseEntryName = fullEntryName.substring(0,
firstDotIndex);
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2440506