Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5856

Camel CXF REST application throws 500 HTTP error when query-param is sent with a space in between

    XMLWordPrintable

Details

    • % %
    • Hide
      • Download and Unzip the attached zip.
      • Build it with mvn clean install
      • Deploy it to fuse using command
        mvn:com.mycompany.testRest/fx.rate.rest/1.0.0-SNAPSHOT
        
      • Invoke request as
        curl http://localhost:8181/cxf/csl/v1/transactions/transactionid/test%20two
        
      Show
      Download and Unzip the attached zip. Build it with mvn clean install Deploy it to fuse using command mvn:com.mycompany.testRest/fx.rate. rest /1.0.0-SNAPSHOT Invoke request as curl http: //localhost:8181/cxf/csl/v1/transactions/transactionid/test%20two
    • 7.0 Sprint 1

    Description

      • Problem does not appear when synchronous=true is set for cxfrs consumer.
        <route id="displayTxnRoute">
        			<from uri="cxfrs:bean:txnSrv?synchronous=true" />
        			<log message="****** TXN received" />
        		</route>
        
      • Error
        [cpandey@cpandey bin]$ curl http://localhost:8181/cxf/csl/v1/transactions/transactionid/test%20two
        [{"transactionId":"test two"}][cpandey@cpandey bin]$ curl http://localhost:8181/cxf/csl/v1/transactions/transactionid/test%20two
        <html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
        <title>Error 500 Server Error</title>
        </head>
        <body><h2>HTTP ERROR 500</h2>
        <p>Problem accessing /cxf/csl/v1/transactions/transactionid/test two. Reason:
        <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalArgumentException: Illegal character in path at index 64: http://localhost:8181/cxf/csl/v1/transactions/transactionid/test two
        	at java.net.URI.create(URI.java:859)
        	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:171)
        	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)
        	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:217)
        	at ja
        

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tasato Tadayoshi Sato
              rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
              Jan Bouska Jan Bouska
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: