Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5237

Can't pass a large, form-encoded POST body through camel-jetty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.3
    • jboss-fuse-6.2.1
    • Camel
    • None
    • % %
    • Hide

      1. Install Fuse 6.2.1
      2. Download and unpack test case from https://github.com/cubiks/jetty-limits
      3. Change the port number in jetty-limits-bridge/src/test/java/com/playground/camel/jetty/limits/test/Bridge
      Test.java, line 94, to match the Jetty endpoint that will be used to consume messages (7071, in this case)
      4. $ mvn compile install
      5. In Fuse console:
      features:install camel-http4
      install -s mvn:com.playground.camel/jetty-limits-bridge/1.0.0-SNAPSHOT
      install -s mvn:com.playground.camel/jetty-limits-server/1.0.0-SNAPSHOT
      6. $ mvn test
      7. Get an ArrayIndexOutOfBounds exception in the Fuse log.
      8. Modify the huge request parameter in BridgeTest.java (line 32) to be a much shorter value, and re-test. The message should pass through correctly.

      Note that bridge-context.xml defines large values for Jetty parameters requestBufferSize, etc., but these don't seem to make any difference to the behaviour.

      Show
      1. Install Fuse 6.2.1 2. Download and unpack test case from https://github.com/cubiks/jetty-limits 3. Change the port number in jetty-limits-bridge/src/test/java/com/playground/camel/jetty/limits/test/Bridge Test.java, line 94, to match the Jetty endpoint that will be used to consume messages (7071, in this case) 4. $ mvn compile install 5. In Fuse console: features:install camel-http4 install -s mvn:com.playground.camel/jetty-limits-bridge/1.0.0-SNAPSHOT install -s mvn:com.playground.camel/jetty-limits-server/1.0.0-SNAPSHOT 6. $ mvn test 7. Get an ArrayIndexOutOfBounds exception in the Fuse log. 8. Modify the huge request parameter in BridgeTest.java (line 32) to be a much shorter value, and re-test. The message should pass through correctly. Note that bridge-context.xml defines large values for Jetty parameters requestBufferSize, etc., but these don't seem to make any difference to the behaviour.
    • 6.3 Sprint 4 (Mar 28 - Apr 29)

      camel-jetty (and, presumably Jetty itself) has a 6kB limit on HTTP form arguments. Such a limit is reasonable enough in a GET request, where the arguments are passed in the HTTP URI. But in a POST request, the arguments are passed in the request body which, in most circumstances, need not be subject to a length restriction. This means that a simple route such as the following fails (with an IndexOutOfBoundsException) when the request contains URL-encoded form data in a POST body of more than 6kB length, even though the route itself does nothing with the contents of the body.

      <from uri="jetty:http://0.0.0.0:7071/bridgeWithJetty?matchOnUriPrefix=true" />
      <to uri="jetty:http://localhost:7070/serviceX?bridgeEndpoint=true" />
      

      Note that this problem does not arise when the "to" endpoint is http4: rather than jetty:, suggesting that this is a problem specific to camel-jetty, rather than a limitation of Camel itself.

            acosenti Andrea Cosentino
            rhn-support-kboone Kevin Boone
            Petr Pecka Petr Pecka
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: