3 Replies Latest reply on Mar 4, 2013 6:57 AM by varsha g

    maximum MAX_HEADER_SIZE in Standalone.xml

    varsha g Newbie

      What is the maximum MAX_HEADER_SIZE value, we can set in Standalone.xml under Jboss7.1.1.Final?

      I checked for data with size 5Mb,and it's accepting it.But is it having any maximumlength?

        • 1. Re: maximum MAX_HEADER_SIZE in Standalone.xml
          abhishek vijra Newbie

          Hi Varsha,

           

          according to org.apache.coyote.http11.Http11Protocol class the default size of MAX_HEADER_SIZE is 8192 bytes but maximum size should depend solely on the client browser , how big a header size a browser can handle . server merely needs to read it.

           

          I don't think jboss web imposes any restrictions on the maximum size of the MAX_HEADER_SIZE .

          • 2. Re: maximum MAX_HEADER_SIZE in Standalone.xml
            Jay SenSharma Master

            Hi Varsha g,

             

                  You can not have more than the following value in MAX_HEADER_SIZE     2147483647   (As this is the Max Integer Value 2147483647)

             

                   http://anonsvn.jboss.org/repos/jbossweb/tags/JBOSSWEB_7_0_16_FINAL/java/org/apache/coyote/http11/Http11Protocol.java

            protected int maxHttpHeaderSize = Integer.valueOf(System.getProperty("org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE", "8192")).intValue();

                 So if you will start your JBoss with more than the value "2147483647"  then you will see following excception at the server start up.

             

                 -Dorg.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE=2147483648

             

             

             

            16:53:35,812 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector.http: JBAS018007: Error starting web connector

                      at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:272)

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_05]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_05]

                      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_05]

            Caused by: java.lang.IllegalArgumentException: Protocol handler instantiation failed: java.lang.NumberFormatException: For input string: "2147483648"

                      at org.apache.catalina.connector.Connector.<init>(Connector.java:91)

                      at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:91)

                      ... 5 more

            • 3. Re: maximum MAX_HEADER_SIZE in Standalone.xml
              varsha g Newbie

              Hi

               

              Jay Kumar SenSharma ,

               

              I randomly put value as 100000000 but 2147483647 seems long

              I checked for more value than 2147483647,and it showed exception.


              Thanks for the answer.