users@jersey.java.net

Authentication header not set when using server-side LoggingFilters

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Thu, 01 Oct 2009 11:07:48 -0600

I configured the below filters for the GrizzlyWebServer.

    
jerseyAdapter.addInitParameter(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS,
SecurityFilter.class.getName());
    
jerseyAdapter.addInitParameter(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS,
LoggingFilter.class.getName());
    
jerseyAdapter.addInitParameter(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS,
LoggingFilter.class.getName());

I get a NPE here:
    String auth = headers.getRequestHeader("authorization").get(0);

If I comment the REQUEST AND RESPONSE Logging filters, then it works. I
am using Jersey 1.0.3.

I believe the auth headers are overridden when using the logging
filters. Any clues on what could be happening here?

Thank you,
Arul