cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Sabo (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-5592) HttpServletRequestFilter in RequestDispatcherProvider do not returns correct RequestURI path
Date Thu, 06 Mar 2014 12:50:47 GMT

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

Michal Sabo edited comment on CXF-5592 at 3/6/14 12:50 PM:
-----------------------------------------------------------

I see your tests for this use case, however I was not successful with the servletPath property
(and as from the HttpServletRequestFilter implementation can be seen, the servletPath property
is not even used for building up the request URI - I have to note, that request URI as the
spec says, should return full path together with the context path).

Nevertheless, as you pointed out, the implementation should not depend on the deployment details,
so the fix would be really welcome.


was (Author: michal.sabo):
I see your tests for this use case, however I was not successful with servletPath property
(and as from the HttpServletRequestFilter implementation can be seen, the servletPath property
is not even used for building up the request URI - I have to note, that request URI as the
spec says, should return full path together with the context path).

Nevertheless, as you pointed out, the implementation should not depend on the deployment details,
so the fix would be really welcome.

> HttpServletRequestFilter in RequestDispatcherProvider do not returns correct RequestURI
path
> --------------------------------------------------------------------------------------------
>
>                 Key: CXF-5592
>                 URL: https://issues.apache.org/jira/browse/CXF-5592
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.8
>            Reporter: Michal Sabo
>
> I have set up RequestDispatcherProvider to redirect from OAuth 2.0 authorization service
(implemented by AuthorizationCodeGrantService) to different JAX-RS service, both served by
the same CXFServlet.
> The problem is HttpServletRequestFilter in RequestDispatcherProvider do not returns correct
RequestURI path - the context root path of the web application is missing. 
> RequestURI is used then by HttpUtils to built JAX-RS service matching path and since
the request URI is not correct, the service is not found.
> Configuration of request dispatcher is the following:
> {code:xml}
> <bean id="dispatchProvider" class="org.apache.cxf.jaxrs.provider.RequestDispatcherProvider">
>         <property name="classResources">
>             <map>
>                 <entry key="org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData"
value="/oauth2/implicitauthorize"/>
>             </map>
>         </property>
>         <property name="beanNames">
>             <map>
>                 <entry key="org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData"
value="data"/>
>             </map>
>         </property>
>         <property name="logRedirects" value="true"/>
>     </bean>
> {code}
> Comments:
> "rest" is the name of the application (context root where the application is deployed)
> "/*" is CXFServlet's URL pattern
> "/oauth2" is the jaxrs:server address
> "/implicitauthorize" is the path of the mentioned JAX-RS service where the redirect should
go



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message