AsyncHttpClient / async-http-client

Asynchronous Http and WebSocket Client library for Java
Other
6.29k stars 1.59k forks source link

Add configuration options to enable HttpClientCodec.allowDuplicateContentLengths flag #1889

Open dgolombek opened 1 year ago

dgolombek commented 1 year ago

We're using AsyncHttpClient to proxy requests, some of which contain multiple Content-Length flags, and for a few different reasons we don't want to remove the duplicates. Currently AHC doesn't allow configuration of that flag, nor is there any easy way to replace the ChannelManager with our own that does what we need. This will require two configuration variables in AHC, since HttpClientCodec doesn't have a builder interface so we'll need to set both parseHttpAfterConnectRequest and allowDuplicateContentLengths (both with defaults of false). I'll submit a PR to implement this.

hyperxpro commented 1 year ago

Sure, please do a PR. I will be happy to review it. :)