Uploaded image for project: 'Red Hat Build of Apache Camel for Quarkus'
  1. Red Hat Build of Apache Camel for Quarkus
  2. CEQ-12544

Setting chunkedMaxContentLength with a query parameter ignored

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 0

      A customer has noticed that when posting pdf files on a Quarkus Camel route using netty-http that small files work, but larger ones result in "HTTP/1.1 413 Request Entity Too Large".

      This happens when they set chunkedMaxContentLength with a query parameter. The query parameter is ignored and the default 1048576 applied.

      When they set chunkedMaxContentLength in configuration they following code works:

      @Singleton
      @Named(HttpDestinationNettyHttpComponent.HTTP_DESTINATION_NETTY_HTTP_CONSUMER)
      public class HttpDestinationNettyHttpComponent extends NettyHttpComponent {
          public static final String HTTP_DESTINATION_NETTY_HTTP_CONSUMER = "httpDestinationNettyHttpConsumer";
          @Inject
          public HttpDestinationNettyHttpComponent(Config config) {
              super();
              NettyHttpConfiguration nettyHttpConfiguration = new NettyHttpConfiguration();
              nettyHttpConfiguration.setChunkedMaxContentLength(config.getValue("chunkedMaxContentLength", Integer.class));
              this.setConfiguration(nettyHttpConfiguration);
          }
      }
      

      Is this a bug, or it's working as expected?

      I see mention of chunkedMaxContentLength as being a query parameter here:
      https://docs.redhat.com/en/documentation/red_hat_fuse/7.5/html/apache_camel_component_reference/netty4-http-component

      But maybe within quarkus, it can only be set through configuration?

              rh-ee-jinychen Jinyu Chen
              rhn-support-mmillson Michael Millson
              Tomas Veskrna Tomas Veskrna
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: