You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/03/23 09:34:25 UTC

[jira] [Resolved] (CAMEL-9343) CORS OPTIONS fails for services with path params when using servlet component

     [ https://issues.apache.org/jira/browse/CAMEL-9343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-9343.
--------------------------------
       Resolution: Fixed
         Assignee: Claus Ibsen
    Fix Version/s: 2.17.0

> CORS OPTIONS fails for services with path params when using servlet component
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-9343
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9343
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-swagger
>    Affects Versions: 2.16.0
>            Reporter: Morten Lynge
>            Assignee: Claus Ibsen
>              Labels: CORS
>             Fix For: 2.17.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)