Comments (6)
Using the baseline service
curl -X GET http://0:8080/cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader
works as expected. When one runs
curl -X OPTIONS http://0:8080/cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader
the behaviour is somewhat unexpected for me because it succeeds as well. The extensions clearly defines GET as the verb to use (file BaselineService-extensions line 33) and this is where i find it confusing.
I'm thinking of a possible impl for cors to submit for your judgment and it would be following the lines of com.betfair.cougar.transport.jetty.GzipHandler. The issue with it is that it would hijack the OPTIONS verb for cors handling and would break the behaviour described above...
from cougar.
What is the behaviour with OPTIONS?
If currently it behaves same as GET then this is a bug so we should be
comfortable breaking it.
On 10 Nov 2014 10:53, "Jorge Silva" [email protected] wrote:
Using the baseline service
curl -X GET http://0:8080/cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader
works as expected. When one runs
curl -X OPTIONS http://0:8080/cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader
the behaviour is somewhat unexpected for me because the extensions clearly
defines GET as the verb to use (file BaselineService-extensions line 33).I'm thinking of a possible impl for cors to submit for your judgment and
it would be following the lines of
com.betfair.cougar.transport.jetty.GzipHandler. The issue with it is that
it would hijack the OPTIONS verb for cors handling and would break the
behaviour described above...—
Reply to this email directly or view it on GitHub
#87 (comment).
from cougar.
It executes similar code paths. OPTIONS brings an additional Vary header
With OPTIONS
curl -v -X OPTIONS http://0:8080/cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader
* Adding handle: conn: 0x7fc863803000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fc863803000) send_pipe: 1, recv_pipe: 0
* About to connect() to 0 port 8080 (#0)
* Trying 0.0.0.0...
* Connected to 0 (0.0.0.0) port 8080 (#0)
> OPTIONS /cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader HTTP/1.1
> User-Agent: curl/7.30.0
> Host: 0:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 10 Nov 2014 13:40:30 GMT
* Server Cougar 2 - 3.2-SNAPSHOT is not blacklisted
< Server: Cougar 2 - 3.2-SNAPSHOT
< Cache-Control: no-cache
< Content-Type: application/json
< Content-Length: 16
<
* Connection #0 to host 0 left intact
"X-UUID-Parents"
With GET
curl -v -X GET http://0:8080/cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader
* Adding handle: conn: 0x7f8503803000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7f8503803000) send_pipe: 1, recv_pipe: 0
* About to connect() to 0 port 8080 (#0)
* Trying 0.0.0.0...
* Connected to 0 (0.0.0.0) port 8080 (#0)
> GET /cougarBaseline/v2/propertyEcho?propertyName=cougar.client.http.uuidparentsheader HTTP/1.1
> User-Agent: curl/7.30.0
> Host: 0:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 10 Nov 2014 13:41:31 GMT
* Server Cougar 2 - 3.2-SNAPSHOT is not blacklisted
< Server: Cougar 2 - 3.2-SNAPSHOT
< Cache-Control: no-cache
< Content-Type: application/json
< Vary: Accept-Encoding, User-Agent
< Content-Length: 16
<
* Connection #0 to host 0 left intact
"X-UUID-Parents"
from cougar.
a minimum working solution is open for discussion at #89. It has no tests. It should serve to see if the rationale is correctly adapted to the cougar reality.
from cougar.
@bfmike - do you have any concerns/thoughts from a security perspective on adding CORS support to Cougar?
I suggest that once this is added we deprecate the data frame solution and remove it in Cougar 4 (whenever that occurs).
from cougar.
All merged and tests passing.
from cougar.
Related Issues (20)
- Guava dependency? HOT 2
- Rework SoapTransportCommandProcessor command resolution
- ExecutionContextResolver HOT 2
- Use ProtocolRegistry and stop Protocol being an enum
- Bug in the generated client code regarding TimeConstraints HOT 2
- The new asyncHttpReponseProcessorThreadPool should be exposed via JMX HOT 1
- New transport for Swagger Spec HOT 8
- Add json-rpc support to client
- Bug in the generated client code regarding TimeConstraints - TRUNK fix
- Consider using netty HOT 2
- Socket protocol compatibility testing HOT 4
- InterceptingExecutableWrapper bug introduced Feb 2014
- Upgrade Jetty to >= 9.1 HOT 7
- Deprecate dataframe now we have cors HOT 3
- Permit support for message parameter in exception idd definition
- Property value output on start up is rendered as {2} always HOT 2
- Property value output on start up is rendered as {2} always (3.2)
- Throw exception if try to construct service exception with null cause
- Cleanup zipkin transport dependencies HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cougar.