[ 
https://issues.apache.org/jira/browse/FELIX-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15204292#comment-15204292
 ] 

Anders Engström commented on FELIX-5219:
----------------------------------------

I'm following up to my own comment here :).

So, I *think* I've found a fix: 
https://github.com/metamorph/felix/commit/c5c9c58769cfe2d238fe4368a8f5633884f25f68

{quote}
For some libraries to work correctly when running as servlets inside an OSGi
container the HttpServletRequest must be consistent. This applied to
"osgi-jax-rs-connector" and to the "Felix WebConsole".

Basically, it must be possible to construct the correct request path by
concatening "contextPath", "servletPath" and "pathInfo" (so that it matches a
proper subset of the original requestURI).

In order to achieve this in the case of a proxied request, the servletPath that
should be propagated to servlets registered in the OSGi container is the
servletPath of the original request *+* the servletPath from the
"PathResolution".
{quote}

With the changes in place it seems that both osgi-jax-rs-connector and Felix 
WebConsole works fine with 3.x of the proxy/bridge.

[~cziegeler] : If you'd like I can create a proper pull-request to the Felix 
Github project and we can discuss it further there?

> Servlet Bridge does not work if not mounted as root servlet
> -----------------------------------------------------------
>
>                 Key: FELIX-5219
>                 URL: https://issues.apache.org/jira/browse/FELIX-5219
>             Project: Felix
>          Issue Type: Bug
>          Components: HTTP Service
>    Affects Versions: http.proxy-3.0.0, http.bridge-3.0.0, http.bridge-3.0.2, 
> http.bridge-3.0.4, http.bridge-3.0.6
>            Reporter: Anders Engström
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> As described in the email thread 
> http://www.mail-archive.com/users%40felix.apache.org/msg17074.html -- the 
> Http Servlet Proxy/Bridge does not work when binding the Proxy Servlet 
> something else than {{/*}}.
> It seems that the bug was introduced in the 3.* versions - the proxy/bridge 
> works as expected with version {{2.3.2}}.
> I've created a reference project at 
> https://github.com/metamorph/http-osgi-bridge that demonstrates the bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to