Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5347

Request routing is broken when the URL contains both jsessionid and an extension

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.7
    • Fix Version/s: 3.0.0-milestone1, 2.7.8, 2.6.11
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When the application receive a request with an url containing an extension and the jsessionid, like http://mycompany.com/app/service.xml;jsessionid , CXF is not able to match the path to a registered service :

      WARNING: No operation matching request path "/cxf-sample/hello/jsonBean.json;jsessionid=mysession" is found, Relative Path: /jsonBean.json;jsessionid=mysession, HTTP Method: POST, ContentType: application/json, Accept: application/json,. 
      Oct 21, 2013 4:57:54 PM org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
      WARNING: javax.ws.rs.ClientErrorException
      	at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:503)
      	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:227)
      	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:103)
      [...]
      

      The reason is that the class org.apache.cxf.jaxrs.impl.RequestPreprocessor doesn't strip the jsessionid before trying to match extension/language mappings

        Attachments

        1. CXF-5347.tar.gz
          3 kB
          Alnour Goulamhoussen

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              agoulamhoussen Alnour Goulamhoussen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: