gateway-http append forward-slash(/) to jaxrs extensionMappings url.

Solution Verified - Updated -

Issue

  • cxf extension mapping don't work as expected if behind fabric http gateway.Fabric http gateway adds trailing "/" even on extension mappings.
  • GET /x/y/.pdf produces /x/y/.pdf/ --> is not found by extensionMappings
  • We have to double every extensionMapping so that it works with and without http gateway which is ugly.
  • blueprint.xml
<jaxrs:server id="restService" address="/CxfRsRouterTest/rest" >
    <jaxrs:serviceBeans>
      <ref component-id="customerService"/>
    </jaxrs:serviceBeans>
    <jaxrs:extensionMappings>
         <entry key="pdf/" value="application/pdf" /> <!-- Fabric http gateway adds trailing "/" even on extension mappings -->
         <entry key="pdf" value="application/pdf" />
    </jaxrs:extensionMappings>
</jaxrs:server>

Environment

  • Red Hat JBoss Fuse
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content