Registering an alias direct to a single resource seems to fail
--------------------------------------------------------------
Key: FELIX-503
URL: https://issues.apache.org/jira/browse/FELIX-503
Project: Felix
Issue Type: Bug
Components: HTTP Service
Reporter: Rob Walker
Priority: Minor
Registering a direct alias is not so common, but also doesn't seem to be
against or forbidden by the OSGi spec, although it'd be worthwhile reviewing
the alias rules as part of initial investigations.
The following was reported by [EMAIL PROTECTED] on the user's list :
----
I have problems registering resources via the HttpService in Apache Felix. I'm
using Apache Felix Version 1.0.3 and the HttpService-Bundle
org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar.
My Problem is that:
|> http.registerResources("/image.png", "/image.png", null);
does not work. It seems that the HttpService-Bundle internally registers the
resource as "image.png/" because I'm getting the following error message in the
console:
|> WARNING: image.png/
(org.apache.felix.moduleloader.ResourceNotFoundException: image.png/)
And my browser is always redirected from "/image.png" to "/image.png/":
|> ~$ telnet localhost 8080
|> Trying 127.0.0.1...
|> Connected to localhost.
|> Escape character is '^]'.
|> GET /image.png HTTP/1.0
|> Host: localhost
|> |> HTTP/1.1 302 Moved Temporarily
|> Date: Fri, 22 Feb 2008 13:51:09 GMT
|> Server: Jetty/4.2.x (Linux/2.6.20-16-generic i386 java/1.5.0_11)
|> Location: http://localhost/image.png/
|> Connection: close
If I start felix in debugging-mode, put a breakpoint into
org.apache.felix.http.jetty.OsgiResourceHandler function "handle( String
pathInContext,...)" and change the value of the requested resource name from
"/image.png/" back to "/image.png" it works fine.
I've also tested my bundle with knopflerfish where it works without a problem.
What can I do to get it to run with Apache felix? Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.