|
66 | 66 | import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHashedWheelTimerSize; |
67 | 67 | import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHashedWheelTimerTickDuration; |
68 | 68 | import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecInitialBufferSize; |
| 69 | +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientParseHttpAfterConnectRequest; |
| 70 | +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientAllowDuplicateContentLengths; |
69 | 71 | import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxChunkSize; |
70 | 72 | import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxHeaderSize; |
71 | 73 | import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxInitialLineLength; |
@@ -181,6 +183,8 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { |
181 | 183 | private final int httpClientCodecMaxHeaderSize; |
182 | 184 | private final int httpClientCodecMaxChunkSize; |
183 | 185 | private final int httpClientCodecInitialBufferSize; |
| 186 | + private final boolean httpClientParseHttpAfterConnectRequest; |
| 187 | + private final boolean httpClientAllowDuplicateContentLengths; |
184 | 188 | private final int chunkedFileChunkSize; |
185 | 189 | private final Map<ChannelOption<Object>, Object> channelOptions; |
186 | 190 | private final @Nullable EventLoopGroup eventLoopGroup; |
@@ -275,6 +279,8 @@ private DefaultAsyncHttpClientConfig(// http |
275 | 279 | int httpClientCodecMaxHeaderSize, |
276 | 280 | int httpClientCodecMaxChunkSize, |
277 | 281 | int httpClientCodecInitialBufferSize, |
| 282 | + boolean httpClientParseHttpAfterConnectRequest, |
| 283 | + boolean httpClientAllowDuplicateContentLengths, |
278 | 284 | int chunkedFileChunkSize, |
279 | 285 | int webSocketMaxBufferSize, |
280 | 286 | int webSocketMaxFrameSize, |
@@ -369,6 +375,8 @@ private DefaultAsyncHttpClientConfig(// http |
369 | 375 | this.httpClientCodecMaxHeaderSize = httpClientCodecMaxHeaderSize; |
370 | 376 | this.httpClientCodecMaxChunkSize = httpClientCodecMaxChunkSize; |
371 | 377 | this.httpClientCodecInitialBufferSize = httpClientCodecInitialBufferSize; |
| 378 | + this.httpClientParseHttpAfterConnectRequest = httpClientParseHttpAfterConnectRequest; |
| 379 | + this.httpClientAllowDuplicateContentLengths = httpClientAllowDuplicateContentLengths; |
372 | 380 | this.chunkedFileChunkSize = chunkedFileChunkSize; |
373 | 381 | this.channelOptions = channelOptions; |
374 | 382 | this.eventLoopGroup = eventLoopGroup; |
@@ -704,6 +712,17 @@ public int getHttpClientCodecInitialBufferSize() { |
704 | 712 | return httpClientCodecInitialBufferSize; |
705 | 713 | } |
706 | 714 |
|
| 715 | + @Override |
| 716 | + public boolean getHttpClientParseHttpAfterConnectRequest() { |
| 717 | + return httpClientParseHttpAfterConnectRequest; |
| 718 | + } |
| 719 | + |
| 720 | + @Override |
| 721 | + public boolean getHttpClientAllowDuplicateContentLengths() { |
| 722 | + return httpClientAllowDuplicateContentLengths; |
| 723 | + } |
| 724 | + |
| 725 | + |
707 | 726 | @Override |
708 | 727 | public int getChunkedFileChunkSize() { |
709 | 728 | return chunkedFileChunkSize; |
@@ -857,6 +876,8 @@ public static class Builder { |
857 | 876 | private int httpClientCodecMaxHeaderSize = defaultHttpClientCodecMaxHeaderSize(); |
858 | 877 | private int httpClientCodecMaxChunkSize = defaultHttpClientCodecMaxChunkSize(); |
859 | 878 | private int httpClientCodecInitialBufferSize = defaultHttpClientCodecInitialBufferSize(); |
| 879 | + private boolean httpClientParseHttpAfterConnectRequest = defaultHttpClientParseHttpAfterConnectRequest(); |
| 880 | + private boolean httpClientAllowDuplicateContentLengths = defaultHttpClientAllowDuplicateContentLengths(); |
860 | 881 | private int chunkedFileChunkSize = defaultChunkedFileChunkSize(); |
861 | 882 | private boolean useNativeTransport = defaultUseNativeTransport(); |
862 | 883 | private boolean useOnlyEpollNativeTransport = defaultUseOnlyEpollNativeTransport(); |
@@ -1329,6 +1350,16 @@ public Builder setHttpClientCodecInitialBufferSize(int httpClientCodecInitialBuf |
1329 | 1350 | return this; |
1330 | 1351 | } |
1331 | 1352 |
|
| 1353 | + public Builder setHttpClientParseHttpAfterConnectRequest(boolean httpClientParseHttpAfterConnectRequest) { |
| 1354 | + this.httpClientParseHttpAfterConnectRequest = httpClientParseHttpAfterConnectRequest; |
| 1355 | + return this; |
| 1356 | + } |
| 1357 | + |
| 1358 | + public Builder setHttpClientAllowDuplicateContentLengths(boolean httpClientAllowDuplicateContentLengths) { |
| 1359 | + this.httpClientAllowDuplicateContentLengths = httpClientAllowDuplicateContentLengths; |
| 1360 | + return this; |
| 1361 | + } |
| 1362 | + |
1332 | 1363 | public Builder setChunkedFileChunkSize(int chunkedFileChunkSize) { |
1333 | 1364 | this.chunkedFileChunkSize = chunkedFileChunkSize; |
1334 | 1365 | return this; |
@@ -1477,6 +1508,8 @@ public DefaultAsyncHttpClientConfig build() { |
1477 | 1508 | httpClientCodecMaxHeaderSize, |
1478 | 1509 | httpClientCodecMaxChunkSize, |
1479 | 1510 | httpClientCodecInitialBufferSize, |
| 1511 | + httpClientParseHttpAfterConnectRequest, |
| 1512 | + httpClientAllowDuplicateContentLengths, |
1480 | 1513 | chunkedFileChunkSize, |
1481 | 1514 | webSocketMaxBufferSize, |
1482 | 1515 | webSocketMaxFrameSize, |
|
0 commit comments