Re: CORS

2011-11-30 Thread Benson Margulies
The code doesn't quite work as you expect. If there is no origin header at all, the input filter gets an empty array, not a null, so it does the wrong thing. On Sat, Nov 12, 2011 at 2:35 AM, K Fung kfung4...@gmail.com wrote: Hello, Are there any plans to expand this code so that covers both

'parsing failed' -- detecting invalid headers

2011-11-30 Thread Benson Margulies
In many cases, http://www.w3.org/TR/cors/#resource-preflight-requests calls for the service to note the presence of an invalid header differently from no header at all. Have we got any way to keep track of this? or do we already reject requests with 'imparsible' headers?

Re: 'parsing failed' -- detecting invalid headers

2011-11-30 Thread Sergey Beryozkin
On 30/11/11 15:21, Benson Margulies wrote: In many cases, http://www.w3.org/TR/cors/#resource-preflight-requests calls for the service to note the presence of an invalid header differently from no header at all. Have we got any way to keep track of this? or do we already reject requests with

The JAX-RS system tests

2011-11-30 Thread Benson Margulies
There are a set of tests surrounding AbstractSpringServer. Each one has a beans.xml that launches an endpoint; but then somehow the additional service is launched. Are the 'launched' services also inside the endpoint with the same providers?

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:

Re: svn commit: r1208752 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors: CrossOriginInputFilter.java CrossOriginOutputFilter.java

2011-11-30 Thread Benson Margulies
I almost beat you to this. On Wed, Nov 30, 2011 at 3:27 PM, dk...@apache.org wrote: Author: dkulp Date: Wed Nov 30 20:27:39 2011 New Revision: 1208752 URL: http://svn.apache.org/viewvc?rev=1208752view=rev Log: Compile on java5 Modified: