cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4446) CXF JAX-RS can't handle spaces in the URL when used with Apache Tomcat
Date Thu, 17 Oct 2013 17:17:43 GMT

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

Sergey Beryozkin commented on CXF-4446:
---------------------------------------

At this stage the JAX-RS runtime is not even there, CXF takes what the container gives to
it and creates URL and for whatever reasons, Tomcat gives you a decoded URL, you can confirm
it by registering ServletFilter and doing HttpServletRequest.getRequestURL

> CXF JAX-RS can't handle spaces in the URL when used with Apache Tomcat
> ----------------------------------------------------------------------
>
>                 Key: CXF-4446
>                 URL: https://issues.apache.org/jira/browse/CXF-4446
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.6.1
>         Environment: Scientific Linux 6.1, Apache Tomcat 7.0.22, Java 1.6.0_29
>            Reporter: Andrew Rowley
>            Assignee: Sergey Beryozkin
>
> Putting an encoded space (%20) in the url gets the following exception:
> java.lang.IllegalArgumentException
> 	java.net.URI.create(URI.java:842)
> 	org.apache.cxf.transport.servlet.BaseUrlHelper.getBaseURL(BaseUrlHelper.java:49)
> 	org.apache.cxf.transport.servlet.ServletController.getBaseURL(ServletController.java:73)
> 	org.apache.cxf.transport.servlet.ServletController.updateDestination(ServletController.java:82)
> 	org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
> 	org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
> 	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
> 	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	uk.ac.nactem.kalliope.security.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:85)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
> 	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
> 	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
> root cause
> java.net.URISyntaxException: Illegal character in path at index 50: http://www.nactem.ac.uk/ArgoDemoTest/services/test
test
> 	java.net.URI$Parser.fail(URI.java:2809)
> 	java.net.URI$Parser.checkChars(URI.java:2982)
> 	java.net.URI$Parser.parseHierarchical(URI.java:3066)
> 	java.net.URI$Parser.parse(URI.java:3014)
> 	java.net.URI.<init>(URI.java:578)
> 	java.net.URI.create(URI.java:840)
> 	org.apache.cxf.transport.servlet.BaseUrlHelper.getBaseURL(BaseUrlHelper.java:49)
> 	org.apache.cxf.transport.servlet.ServletController.getBaseURL(ServletController.java:73)
> 	org.apache.cxf.transport.servlet.ServletController.updateDestination(ServletController.java:82)
> 	org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
> 	org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
> 	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
> 	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	uk.ac.nactem.kalliope.security.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:85)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
> 	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
> 	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
> 	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
> 	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message