Uploaded image for project: 'JBoss Web'
  1. JBoss Web
  2. JBWEB-309

Getting 505 status instead 413 for long query parameters string and connection shut down on client side


    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: JBossWeb-7.0.16.GA
    • Fix Version/s: None
    • Component/s: Tomcat
    • Labels:



      During investigation bug in our application, I've figured out that we send too long queries parameters string ( such as size of request headers > org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE) to Jboss.

      There are strange things were:
      1. Response status code = 505, instead 413 as per HTTP1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).

      2. After client gets back 505, jboss destroys socket and client will get "java.net.SocketException: Connection reset" if tried to parse response or reuse connection in connection pool.

      Here is Jboss DEBUG logs:
      13:53:41,977 DEBUG [org.apache.coyote.http11.Http11Processor] (http-/ Error parsing HTTP request header: java.lang.IllegalArgumentException: Request header is too large
      at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:727) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:435) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:838) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
      at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

      13:53:41,978 DEBUG [org.apache.coyote.http11.Http11Processor] (http-/ Error preparing request Unsupported HTTP version "null"
      13:53:44,830 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1423173224830 sessioncount 0
      13:53:44,830 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 0 expired sessions: 0
      13:53:54,911 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) PeriodicRecovery: background thread Status <== SCANNING
      13:53:54,911 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) PeriodicRecovery: background thread scanning
      13:53:54,911 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) Periodic recovery first pass at Thu, 5 Feb 2015 13:53:54
      13:53:54,911 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) AtomicActionRecoveryModule first pass
      13:53:54,911 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) processing /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction transactions
      13:53:54,911 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery)

      So it looks like 505 status is returned because protocol version was not parsed at all.

        Gliffy Diagrams




              • Assignee:
                rmaucher Remy Maucherat
                rnikolaenko Roman Nikolaienko
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: