3 Replies Latest reply on Jan 27, 2005 11:17 AM by gs03ann

    Request Header

      I have implemented a filter to gzip the response, but the "Accept-Encoding" header is never present in the request... Is is possible that JBoss does something to the request and takes this header away before it reaches the filter? I am using JBoss 3.2.6

      Thanks

        • 1. Re: Request Header

          This is a print out of what comes in the request but what happened to "Accept-Encoding"? It seems to be overriden by "--------:----" Any ideas?

          20:54:19,750 INFO [STDOUT] Header: host value: www.consignmentmanager.com
          20:54:19,750 INFO [STDOUT] Header: user-agent value: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
          20:54:19,750 INFO [STDOUT] Header: accept value: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
          20:54:19,750 INFO [STDOUT] Header: accept-language value: en-us,en;q=0.5
          20:54:19,750 INFO [STDOUT] Header: --------------- value: ------------
          20:54:20,109 INFO [STDOUT] Header: accept-charset value: ISO-8859-1,utf-8;q=0.7,*;q=0.7
          20:54:20,109 INFO [STDOUT] Header: Keep-Alive value: 300
          20:54:20,109 INFO [STDOUT] Header: connection value: keep-alive
          20:54:20,109 INFO [STDOUT] Header: ------- value: ----:---------------------------------------------------------------------------------------------------------
          20:54:20,109 INFO [STDOUT] Header: cookie value: JSESSIONID=FC0561FB1F1F3ABAA445973E5C9756B6
          20:54:20,109 INFO [STDOUT] Header: content-length value: 0


          • 2. Re: Request Header
            starksm64

            Works fine for me. I threw a snoop.jsp page into the jmx-console.war, enabled the RequestDumperValve and printed out the request.getHeader("Accept-Encoding") header value as seen in the jsp page:


            console output of RequestDumperValve:

            10:16:00,622 INFO [Server] JBoss (MX MicroKernel) [3.2.6 (build: CVSTag=JBoss_3
            _2_6 date=200410140106)] Started in 23s:703ms
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: REQUEST URI =/jmx-console/snoop.jsp
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: authType=null
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: characterEncoding=null
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: contentLength=-1
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: contentType=null
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: contextPath=/jmx-console
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: header=host=localhost:8080
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: header=accept-language=en-us,en;q=0.5
            10:16:01,372 INFO [Engine] RequestDumperValve[localhost]: header=accept-encoding=gzip,deflate
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: header=keep-alive=300
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: header=connection=keep-alive
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: locale=en_US
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: method=GET
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: pathInfo=null
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: protocol=HTTP/1.1
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: queryString=null
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: remoteAddr=127.0.0.1
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: remoteHost=127.0.0.1
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: remoteUser=null
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: requestedSessionId=null
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: scheme=http
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: serverName=localhost
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: serverPort=8080
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: servletPath=/snoop.jsp
            10:16:01,387 INFO [Engine] RequestDumperValve[localhost]: isSecure=false
            10:16:01,403 INFO [Engine] RequestDumperValve[localhost]: ---------------------------------------------------------------
            


            snoop.jsp output:
            Request Information
            JSP Request Method: GET
            accept-encoding: gzip,deflate
            Request URL: http://localhost:8080/jmx-console/snoop.jsp
            Request URI: /jmx-console/snoop.jsp
            Request Protocol: HTTP/1.1
            Servlet path: /snoop.jsp
            


            Create a bug report with the details of how to reproduce the missing header here:
            http://jira.jboss.com/jira/browse/JBWEB


            • 3. Re: Request Header

              This is not really a bug. The problem here is introduced, for example in my case, by a personal fire wall running on my client machine. Somehow, when my personal fire wall ( Norton ) is enabled, it removes the "accept-encoding: gzip,deflate" headers only, as you can see in my reply above.
              So once again, it seems that I am at the mercy of the client...