Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2685

Setting headers multiple times does not work with all containers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 4.1
    • core
    • winstone or jetty6

      This is currently visible with Winstone. For some reason, the servlet response is already committed when we try to add headers. (from the cache or gzip filters, possibly)
      This might even only be occuring currently with the quickstart page.
      This results in a blank page.

      Winstone ignores such redundant headers (see below)
      Jetty seems to just ignore the fact that they're redundant and adds them multiple times (although I assume we use setHeader and not addHeader?)

      [Winstone 2009/04/07 12:35:28] - Cached filter chain available for cacheKey=FORWARD:URI:/.magnolia/pages/quickstart.html
      [Winstone 2009/04/07 12:35:28] - Executing Filter: magnoliaFilterChain
      [Winstone 2009/04/07 12:35:28] - Setting response character encoding to UTF-8
      [Winstone 2009/04/07 12:35:28] - Setting the request encoding from UTF-8 to UTF-8
      [Winstone 2009/04/07 12:35:28] - Setting response character encoding to UTF-8
      [Winstone 2009/04/07 12:35:28] - ServletOutputStream flushed
      [Winstone 2009/04/07 12:35:28] - Headers prepared for writing: [Server: Winstone Servlet Engine v0.9.10, Content-Type: text/html;charset=UTF-8, Connection: Close, Date: Tue, 07 Apr 2009 10:35:28 GMT, X-Powered-By: Servlet/2.5 (Winstone/0.9.10)]
      [Winstone 2009/04/07 12:35:28] - Committing response body
      [Winstone 2009/04/07 12:35:28] - Response: HTTP/1.1 200 OK
      [Winstone 2009/04/07 12:35:28] - Header: Server: Winstone Servlet Engine v0.9.10
      [Winstone 2009/04/07 12:35:28] - Header: Content-Type: text/html;charset=UTF-8
      [Winstone 2009/04/07 12:35:28] - Header: Connection: Close
      [Winstone 2009/04/07 12:35:28] - Header: Date: Tue, 07 Apr 2009 10:35:28 GMT
      [Winstone 2009/04/07 12:35:28] - Header: X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
      [Winstone 2009/04/07 12:35:28] - Written 0 bytes to response body
      [Winstone 2009/04/07 12:35:28] - Header ignored after response committed - Content-Encoding: gzip 
      WARN   info.magnolia.cms.util.RequestHeaderUtil RequestHeaderUtil.java(addAndVerifyHeader:68) RequestHandlerThread[#4] 2009-04-07 12:35:28,349 Unable to add response header Content-Encoding: gzip (uri:/.magnolia/trees/website.html userid:superuser)
      [Winstone 2009/04/07 12:35:28] - Header ignored after response committed - Vary: Accept-Encoding 
      WARN   info.magnolia.cms.util.RequestHeaderUtil RequestHeaderUtil.java(addAndVerifyHeader:68) RequestHandlerThread[#4] 2009-04-07 12:35:28,350 Unable to add response header Vary: Accept-Encoding (uri:/.magnolia/trees/website.html userid:superuser)
      [Winstone 2009/04/07 12:35:28] - Header ignored after response committed - Content-Length: 3874 
      

        Acceptance criteria

              Unassigned Unassigned
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD