Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-2297

CPS NCMP: HTTP 431 Request Header Fields Too Large

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Highest Highest
    • Oslo Release
    • Oslo Release
    • NCMP
    • None

      NCMP throws "HTTP 431 Request Header Fields Too Large" response when trying to fetch attribute details.

      Affected version

      3.4.8, also observed on 3.5.0

      Reproduction

      curl --location --request GET 'https://<ncmpHost>/ncmp/v1/ch/<cmHandleId>/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=GNBDUFunction=1' \
      --header 'Content-Type: application/json' \
      --header 'Cookie: <8000 long string which fits in to 8KByte header limit>'

      Expected behavior

      Do not throw an error when the full request size is under the 8KB limit. The error message should not only contain the exception, but ideally provide which request header field is too large.

      Workaround

      Send a smaller request.

      Impact

      The user sends a request which spring boot should be able to handle, but the underlying server still throws an error, so valid requests fail.

       
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
      <title>Error 431 Request Header Fields Too Large</title>
      </head>
      <body>
      <h2>HTTP ERROR 431 Request Header Fields Too Large</h2>
      <table>
      <tr><th>URI:</th><td>/v1/ch/256DCEB2614EE90305A25CA1CDCCA288/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=GNBDUFunction=1</td></tr>
      <tr><th>STATUS:</th><td>431</td></tr>
      <tr><th>MESSAGE:</th><td>Request Header Fields Too Large</td></tr>
      <tr><th>CAUSED BY:</th><td>org.eclipse.jetty.http.BadMessageException: 431: null</td></tr>
      </table>
      <h3>Caused by:</h3><pre>org.eclipse.jetty.http.BadMessageException: 431: null
          at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1164)
          at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1545)
          at org.eclipse.jetty.server.internal.HttpConnection.parseRequestBuffer(HttpConnection.java:568)
          at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:391)
          at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
          at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
          at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
          at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478)
          at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441)
          at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
          at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201)
          at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:410)
          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971)
          at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201)
          at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156)
          at java.base/java.lang.Thread.run(Thread.java:840)
      </pre>

      </body>
      </html>

            mpriyank Priyank Maheshwari
            ekocsom Soma Kocsis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h