[Geoserver-devel] [jira] Created: (GEOS-2547) NullPointerException on ReverseProxyFilter if running on the embedded Jetty

NullPointerException on ReverseProxyFilter if running on the embedded Jetty
---------------------------------------------------------------------------

                 Key: GEOS-2547
                 URL: http://jira.codehaus.org/browse/GEOS-2547
             Project: GeoServer
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 1.7.1
            Reporter: Gabriel Roldán
            Assignee: Gabriel Roldán
             Fix For: 1.7.2

When using the reverse proxy filter, it may happen that {{ServletResponse.getOutputStream()}} is called before {{ServletResponse.setContentType}}. Since the filter depends on the set content type to determine whether to perform URL translation for the {{proxyBaseUrl}} on the response content, this is causing a
{code}
ava.lang.NullPointerException
at org.geoserver.filters.ReverseProxyFilter$CacheingResponseWrapper.getCachedContent(ReverseProxyFilter.java:315)
{code}

A solution being overriding getOutputStream with one that waits until the first write to determine whether to cache or not, based on the set response content type.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira