Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5841D200B3E for ; Wed, 7 Sep 2016 15:29:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56F69160AA3; Wed, 7 Sep 2016 13:29:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A1B0A160ACF for ; Wed, 7 Sep 2016 15:29:21 +0200 (CEST) Received: (qmail 6670 invoked by uid 500); 7 Sep 2016 13:29:20 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 6654 invoked by uid 99); 7 Sep 2016 13:29:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2016 13:29:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 914DA2C1B80 for ; Wed, 7 Sep 2016 13:29:20 +0000 (UTC) Date: Wed, 7 Sep 2016 13:29:20 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-7043) JAX-RS endpoints cannot handle encoded URL when used with continuation and servlet transport MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 07 Sep 2016 13:29:22 -0000 [ https://issues.apache.org/jira/browse/CXF-7043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15470648#comment-15470648 ] Sergey Beryozkin commented on CXF-7043: --------------------------------------- Hi, can you please check this 3.0.x failure: https://builds.apache.org/job/CXF-3.0.x/org.apache.cxf.systests$cxf-systests-jaxrs/4042/testReport/junit/org.apache.cxf.systest.jaxrs/JAXRSCxfContinuationsServlet3Test/org_apache_cxf_systest_jaxrs_JAXRSCxfContinuationsServlet3Test/ I don't think it is related to Servlet3Continuation change, the test servlet can not be launched thanks > JAX-RS endpoints cannot handle encoded URL when used with continuation and servlet transport > -------------------------------------------------------------------------------------------- > > Key: CXF-7043 > URL: https://issues.apache.org/jira/browse/CXF-7043 > Project: CXF > Issue Type: Bug > Components: JAX-RS, Transports > Affects Versions: 3.1.7 > Reporter: Tadayoshi Sato > Assignee: Sergey Beryozkin > Fix For: 3.2.0, 3.1.8, 3.0.11 > > Attachments: cxf-rest-async.zip > > > Suppose a JAX-RS endpoint like below uses CXF Continuations API to handle requests asynchronously: > {code:java} > @Path("/greeting") > public class GreetingService { > @GET @Path("/hello/{name}") > public String hello(@PathParam("name") String name) { > {code} > When this endpoint is invoked with an URL containing encoded characters (e.g. {{"%20"}}): > {code} > http://localhost:9000/greeting/hello/A%20B%20C > {code} > it fails to handle it and throws the following exception: > {code} > java.lang.IllegalArgumentException: Illegal character in path at index 38: http://localhost:9000/greeting/hello/A B C > at java.net.URI.create(URI.java:852) > at org.apache.cxf.transport.servlet.BaseUrlHelper.getBaseURL(BaseUrlHelper.java:48) > at org.apache.cxf.transport.servlet.ServletController.getBaseURL(ServletController.java:74) > at org.apache.cxf.transport.servlet.ServletController.updateDestination(ServletController.java:83) > at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:207) > at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) > at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180) > at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299) > at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:223) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) > at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274) > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) > at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) > at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:517) > at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handleAsync(Server.java:549) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318) > at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:262) > at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.net.URISyntaxException: Illegal character in path at index 38: http://localhost:9000/greeting/hello/A B C > at java.net.URI$Parser.fail(URI.java:2848) > at java.net.URI$Parser.checkChars(URI.java:3021) > at java.net.URI$Parser.parseHierarchical(URI.java:3105) > at java.net.URI$Parser.parse(URI.java:3053) > at java.net.URI.(URI.java:588) > at java.net.URI.create(URI.java:850) > ... 21 more > {code} > Note this issue happens only when the endpoint is used with Servlet Transport. It doesn't happen when it's used with Jetty HTTP Transport. -- This message was sent by Atlassian JIRA (v6.3.4#6332)