Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.16.0
-
Unknown
Description
With CORS enabled the preflight request for services using path params fails. I reproduced the issue by building the camel-example-swagger-java example in the source bundle and deploying to a local tomcat server.
Eg.:
$ curl -I -X OPTIONS http://localhost:8080/camel-example-swagger-java/rest/user/123
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers
However, ".../
{id}" works:
$ curl -I -X OPTIONS http://localhost:8080/camel-example-swagger-java/rest/user/%7Bid%7D
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers
Allow: OPTIONS,GET
Content-Length: 0
The issue was not present in 2.14.