I could put that a bit more clearly.
Until the resource exists, there is no telling if where the resource
ends.
Current behavior is consistent where there is an extension.
But is not consistent where there is not an extension.
IMHO, until there is a resource to indicate what the resource is and
what the extension is all we can say for sure is what the path is.
Ian
eg
curl http://localhost:8080/testing/universal.swf
0 (2009-09-20 08:10:16) Starting Request Processing
0 (2009-09-20 08:10:16) Method=GET, PathInfo=/test/universal.swf
1 (2009-09-20 08:10:16) Starting ResourceResolution
14 (2009-09-20 08:10:16) URI=/test/universal.swf resolves to
Resource=NonExistingResource, path=/test/universal.swf, elapsed = 13ms
14 (2009-09-20 08:10:16) Resource Path Info:
SlingRequestPathInfo: path='/test/universal.swf',
selectorString='null', extension='null', suffix='null'
14 (2009-09-20 08:10:16) Starting ServletResolution
14 (2009-09-20 08:10:16) Starting
resolveServlet(NonExistingResource, path=/test/universal.swf)
14 (2009-09-20 08:10:16) Using servlet
org.apache.sling.servlets.get.DefaultGetServlet, elapsed = 0ms
14 (2009-09-20 08:10:16) URI=/test/universal.swf handled by
Servlet=org.apache.sling.servlets.get.DefaultGetServlet, elapsed = 0ms
14 (2009-09-20 08:10:16) Applying request filters
14 (2009-09-20 08:10:16) Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
14 (2009-09-20 08:10:16) Starting
org.apache.sling.servlets.get.DefaultGetServlet#0
14 (2009-09-20 08:10:16)
org.apache.sling.servlets.get.DefaultGetServlet#0, elapsed = 0ms
14 (2009-09-20 08:10:16) Starting handleError:status=404
14 (2009-09-20 08:10:16) Using handler Sling Default Error
Handler Servlet, elapsed = 0ms
15 (2009-09-20 08:10:16) Error handler finished, elapsed = 1ms
Upload universal.swf and then
0 (2009-09-20 08:12:10) Starting Request Processing
0 (2009-09-20 08:12:10) Method=GET, PathInfo=/test/universal.swf
61 (2009-09-20 08:12:10) Starting ResourceResolution
62 (2009-09-20 08:12:10) URI=/test/universal.swf resolves to
Resource=JcrNodeResource, type=nt:file, superType=null, path=/test/
universal.swf, elapsed = 1ms
62 (2009-09-20 08:12:10) Resource Path Info:
SlingRequestPathInfo: path='/test/universal.swf',
selectorString='null', extension='null', suffix='null'
62 (2009-09-20 08:12:10) Starting ServletResolution
62 (2009-09-20 08:12:10) Starting
resolveServlet(JcrNodeResource, type=nt:file, superType=null, path=/
test/universal.swf)
62 (2009-09-20 08:12:10) Using servlet
org.apache.sling.servlets.get.DefaultGetServlet, elapsed = 0ms
62 (2009-09-20 08:12:10) URI=/test/universal.swf handled by
Servlet=org.apache.sling.servlets.get.DefaultGetServlet, elapsed = 0ms
62 (2009-09-20 08:12:10) Applying request filters
62 (2009-09-20 08:12:10) Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
62 (2009-09-20 08:12:10) Starting
org.apache.sling.servlets.get.DefaultGetServlet#0
62 (2009-09-20 08:12:10) Using
org.apache.sling.servlets.get.impl.helpers.StreamRendererServlet to
render for extension=null
169 (2009-09-20 08:12:10)
org.apache.sling.servlets.get.DefaultGetServlet#0, elapsed = 107ms
169 (2009-09-20 08:12:10) Request Processing ends, elapsed = 169ms
On 19 Sep 2009, at 17:49, Ian Boston wrote:
I think this might break some behavior, as there is no way for the
non existent resource to know if an extension is a serialization
extension or the real extension of the file in the jcr, at the
moment, code that uses non existent resource assumes that the
extension is not determined, and so would need changing to be
compatible with this change.
Ian
On 18 Sep 2009, at 22:05, Carsten Ziegeler wrote:
I'm currently looking through open issues for our API and I stumbled
upon https://issues.apache.org/jira/browse/SLING-864.
What is the general opinion? Should we include it? Is is required?
I would like to either apply or close it to reduce the issue count :)
Regards
Carsten
--
Carsten Ziegeler
cziege...@apache.org