Re: Failing to set an Origin header with a WebClient

2012-02-02 Thread Sergey Beryozkin
Hi The hint from Alex Declent, The solution is to set the system property sun.net.http.allowRestrictedHeaders to true. , should help here as well, I may update the CORS tests to use WebClient and see if it helps... Cheers, Sergey On 01/12/11 16:13, Sergey Beryozkin wrote: Hi Dan On

Re: Failing to set an Origin header with a WebClient

2011-12-01 Thread Benson Margulies
I'd rather write the transport. On Thu, Dec 1, 2011 at 11:13 AM, Sergey Beryozkin sberyoz...@gmail.com wrote: Hi Dan On 01/12/11 16:09, Daniel Kulp wrote: On Thursday, December 01, 2011 10:04:27 AM Sergey Beryozkin wrote: Hi Benson so HTTPUrlConnection drops 'Origin' ? It's unfortunate.

Failing to set an Origin header with a WebClient

2011-11-30 Thread Benson Margulies
I'm failing to set an Origin header with a WebClient. Here's the client side code, and the header does not make it to the other end. This makes it rather difficult to write tests for CORS. On the other hand, should WebClient have native support for the client side of CORS? That's complex and

Re: Failing to set an Origin header with a WebClient

2011-11-30 Thread Benson Margulies
I dumped the exchange, and Origin isn't in there. I haven't turned on the logging interceptors yet. [null, null, null, null, null, null, null, null, null, org.apache.cxf.message.Message.PROTOCOL_HEADERS={Accept=[text/plain], Cache-Control=[no-cache], connection=[keep-alive], content-type=[*/*],

Re: Failing to set an Origin header with a WebClient

2011-11-30 Thread Benson Margulies
Logging. The output logger on the web client shows Origin, but not the input logger on the JAX-RS endpoint it's talking to. INFO: Outbound Message --- ID: 1 Address: http://localhost:9000/simpleGet/HelloThere Http-Method: GET Content-Type: */* Headers: