Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30396

Make max http header size configurable

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.x, 2021.7
    • Component/s: Web Common

      Description

      The current max size for all the http headers is 8192 bytes which is too small to handle some redirects with very long urls (ex: a very long oauth token)

      nuxeo_1  | 2021-05-10 04:11:17 SEVERE [http-nio-0.0.0.0-8080-exec-6] org.apache.coyote.http11.Http11Processor.service Error processing request
      nuxeo_1  |      org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.
      nuxeo_1  |              at org.apache.coyote.http11.Http11OutputBuffer.checkLengthBeforeWrite(Http11OutputBuffer.java:472)
      nuxeo_1  |              at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:425)
      nuxeo_1  |              at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:411)
      nuxeo_1  |              at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:371)
      nuxeo_1  |              at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1005)
      nuxeo_1  |              at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:379)
      nuxeo_1  |              at org.apache.coyote.Response.action(Response.java:211)
      nuxeo_1  |              at org.apache.coyote.Response.sendHeaders(Response.java:437)
      nuxeo_1  |              at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:291)
      nuxeo_1  |              at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:251)
      nuxeo_1  |              at org.apache.catalina.connector.Response.finishResponse(Response.java:443)
      nuxeo_1  |              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:374)
      nuxeo_1  |              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
      nuxeo_1  |              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      nuxeo_1  |              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
      nuxeo_1  |              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597)
      nuxeo_1  |              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      nuxeo_1  |              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      nuxeo_1  |              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      nuxeo_1  |              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      nuxeo_1  |              at java.base/java.lang.Thread.run(Thread.java:834)
      

      At the moment the only solution is to override the whole server.xml file with a configuration template in order to set the value of the maxHttpHeaderSize attribute.

      <Connector port="8080" maxHttpHeaderSize="65536" protocol="HTTP/1.1" ... />
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: