users@jersey.java.net

Re: [Jersey] 1.1.4 & response codes with Atom feeds

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 13 Nov 2009 13:36:11 +0100

Hi,

Can you try and disable the logging filter for the server response?

I think there might be a bug in the LoggingFilter :-(

Paul.

On Nov 13, 2009, at 12:07 PM, Ari Heino wrote:

>
>
>
> Paul Sandoz wrote:
>>
>>
>> Any response entity present?
>>
> No, when client recieves code 200 (instead of expected 304) there is
> no
> entity in response.
>
>
> Paul Sandoz wrote:
>>
>> Do you have any filters configured on the client or server?
>>
> some for server:
> // Add request handlers for logging, EntityManager and security
>
> initParams.put(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS,
> LoggingFilter.class.getName() + ";" +
> EntityManagerFilter.class.getName() +
> ";" + SecurityFilter.class.getName());
>
> // Add response handler for EntityManager
>
> initParams.put(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS,
> LoggingFilter.class.getName() + ";" +
> EntityManagerFilter.class.getName());
>
> // Add annotation factory for security filter
>
> initParams.put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,
> RolesAllowedResourceFilterFactory.class.getName());
>
> SecurityFilter checks request header for authentication parameters.
> EntityManagerFilter handles javax.persistence.EntityManagerFactory
> creation
> and closing.
>
> Client only has LoggingFilter.
>
>
> Paul Sandoz wrote:
>>
>> Can you try using curl to see if a 200 response is returned from the
>> server?
>>
>>
> With curl command:
> curl -i -u Mike:Mike -H "If-Modified-Since: Fri, 13 Nov 2009
> 16:17:37 GMT"
> http://131.207.211.203:8080/webservices/containers/SystemTestContainer/eventfeed
>
> Server log:
> 13.11.2009 13:04:24
> com.sun.jersey.api.container.filter.LoggingFilter filter
> INFO: 77 * Server in-bound request
> 77 > GET http://<ip
> address>:8080/webservices/containers/SystemTestContainer/eventfeed
> 77 > Authorization: Basic TWlrZTpNaWtl
> 77 > Host: 131.207.211.203:8080
> 77 > User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2
> OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
> 77 > If-Modified-Since: Fri, 13 Nov 2009 16:17:37 GMT
> 77 > Accept: */*
> 77 >
>
> 13.11.2009 13:04:24
> com.sun.jersey.api.container.filter.LoggingFilter$Adapter finish
> INFO: 77 * Server out-bound response
> 77 < 304
> 77 < Content-Type: application/atom+xml
> 77 < Last-Modified: Fri, 13 Nov 2009 11:04:24 GMT
> 77 <
>
> curl response headers:
> HTTP/1.1 200 OK
> Content-Length: 0
> Server: Jetty(6.1.x)
>
>
>
> --
> View this message in context: http://n2.nabble.com/1-1-4-response-codes-with-Atom-feeds-tp3998025p3998571.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>