The "enableCORS" option comes with the "restCofiguration" includes a request parameter as a response header for OPTIONS method(preflight request) reply

Solution Verified - Updated -

Issue

Let's say user send an "OPTIONS" request(preflight request) with a request parameter, "id":

curl -v --location --request OPTIONS 'http://localhost:8080/reproducer/example?id=bob' 

Camel will store this request parameter in Exchange.header.
The problem is a response for this OPTIONS request. It contains the request option, "id", as a response header.
This behavior will bring ERR_INVALID_HTTP_RESPONSE error on some browser.

For example, if Japanese character(whitespace) is passed on chrome browser, the ERROR occurs on the browser.

Environment

  • Red Hat Fuse
    • 7.7

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