[ https://issues.apache.org/jira/browse/FELIX-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15203535#comment-15203535 ]
Anders Engström commented on FELIX-5219: ---------------------------------------- I've made some tests with `osgi-jax-rs-connector` and it seems that none of the patches works. One (there might be more) reason that Jersey fails to route the HTTP request to the right endpoint is that the HttpServletRequest that gets passed along is mix between the original request (that went to the ProxyServlet) and the dispatched request such as "Felix Base" sees it ({{org.apache.felix.http.base.internal.dispatch.ServletRequestWrapper}}). In my sample project this gives Jersey a "base-uri" of {{http://localhost:8080/services/}} while the "requestUri" is {{http://localhost:8080/osgi/services/greeter/foo}}. Jersey uses the baseURI and the requestURI to calculate *its* internal routing to the REST endpoint. In this case that *should* be {{/greeter/foo}} but since the baseURI and requestURI doesn't match it gets calculated as {{/ices/greeter/foo}}. Not sure how to approach this.. somewhere in the 3.x refactoring of felix.http is seems that the aspect of proxying requests through an external servlet container got misplaced :). I will try to hack around a bit more on the {{ServletRequestWrapper}} and see if I can get a request through to a REST endpoint. Do you have any other suggestions, [~cziegeler] ? > 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)