Skip to content

Commit fdc53a3

Browse files
committed
Use max line length of 8192 and max header count of 100 for incoming HTTP/1 messages by default
1 parent cc30ee0 commit fdc53a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

httpcore5/src/main/java/org/apache/hc/core5/http/config/Http1Config.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public static Http1Config.Builder copy(final Http1Config config) {
144144
private static final int INIT_BUF_SIZE = 8192;
145145
private static final Timeout INIT_WAIT_FOR_CONTINUE = Timeout.ofSeconds(3);
146146
private static final int INIT_BUF_CHUNK = -1;
147-
private static final int INIT_MAX_HEADER_COUNT = -1;
148-
private static final int INIT_MAX_LINE_LENGTH = -1;
147+
private static final int INIT_MAX_HEADER_COUNT = 100;
148+
private static final int INIT_MAX_LINE_LENGTH = 8192;
149149
private static final int INIT_MAX_EMPTY_LINE_COUNT = 10;
150150

151151
public static class Builder {

0 commit comments

Comments
 (0)