camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9343) CORS OPTIONS fails for services with path params when using servlet component
Date Wed, 23 Mar 2016 08:34:25 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208068#comment-15208068
] 

Claus Ibsen commented on CAMEL-9343:
------------------------------------

Works now just run mvn jetty:run in that example

davsclaus:~/$ curl -I -X OPTIONS http://localhost:8080/camel-example-swagger-xml/rest/user/123
HTTP/1.1 200 OK
Date: Wed, 23 Mar 2016 08:33:11 GMT
Accept: */*
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method,
Access-Control-Request-Headers
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 3600
breadcrumbId: ID-davsclaus-air-51473-1458721963823-0-3
id: 123
User-Agent: curl/7.43.0
Content-Length: 0
Server: Jetty(9.2.15.v20160210)

> 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
>              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)

Mime
View raw message