Skip to content

Commit

Permalink
Revert "fixes #1183 add the Transfer-Encoding of http header into the…
Browse files Browse the repository at this point in the history
… client.yml (#1185)"

This reverts commit aac33ca.
  • Loading branch information
stevehu authored Mar 24, 2022
1 parent aac33ca commit 5960cc4
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
8 changes: 0 additions & 8 deletions client/src/main/java/com/networknt/client/ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ public final class ClientConfig {
public static final long DEFAULT_CONNECTION_EXPIRE_TIME = 1000000;
public static final int DEFAULT_MAX_CONNECTION_PER_HOST = 1000;
public static final int DEFAULT_MIN_CONNECTION_PER_HOST = 250;
public static final String DEFAULT_TRANSFER_ENCODING = "chunked";

private static final String CONNECTION_POOL_SIZE = "connectionPoolSize";
private static final String MAX_REQUEST_PER_CONNECTION = "maxReqPerConn";
private static final String CONNECTION_EXPIRE_TIME = "connectionExpireTime";
private static final String MAX_CONNECTION_NUM_PER_HOST = "maxConnectionNumPerHost";
private static final String MIN_CONNECTION_NUM_PER_HOST = "minConnectionNumPerHost";
private static final String TRANSFER_ENCODING = "transferEncoding";

private final Config config;
private final Map<String, Object> mappedConfig;
Expand All @@ -90,7 +88,6 @@ public final class ClientConfig {
private long connectionExpireTime = DEFAULT_CONNECTION_EXPIRE_TIME;
private int maxConnectionNumPerHost = DEFAULT_MAX_CONNECTION_PER_HOST;
private int minConnectionNumPerHost = DEFAULT_MIN_CONNECTION_PER_HOST;
private String transferEncoding = DEFAULT_TRANSFER_ENCODING;

private static ClientConfig instance;

Expand Down Expand Up @@ -190,9 +187,6 @@ private void setRequestConfig() {
if (requestConfig.containsKey(MIN_CONNECTION_NUM_PER_HOST)) {
minConnectionNumPerHost = (int) requestConfig.get(MIN_CONNECTION_NUM_PER_HOST);
}
if(requestConfig.containsKey(TRANSFER_ENCODING)) {
transferEncoding = (String)requestConfig.get(TRANSFER_ENCODING);
}
}

private void setBufferSize() {
Expand Down Expand Up @@ -314,6 +308,4 @@ public int getMinConnectionNumPerHost() {
}

public boolean isMultipleAuthServers() { return multipleAuthServers; }

public String getTransferEncoding() { return transferEncoding; }
}
2 changes: 0 additions & 2 deletions client/src/main/resources/config/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,3 @@ request:
# minimum quantity of connection in connection pool for each host. The corresponding connection number will shrink to minConnectionNumPerHost
# by remove least recently used connections when the connection number of a host reach 0.75 * maxConnectionNumPerHost.
minConnectionNumPerHost: ${client.minConnectionNumPerHost:250}
# Transfer-Encoding header. valid values: chucked, compress, deflate, gzip or or any valid combination of them. By default, the chucked is used.
transferEncoding: ${client.tansferEncoding:chucked}
2 changes: 0 additions & 2 deletions client/src/test/resources/config/client-multiple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,3 @@ request:
# minimum quantity of connection in connection pool for each host. The corresponding connection number will shrink to minConnectionNumPerHost
# by remove least recently used connections when the connection number of a host reach 0.75 * maxConnectionNumPerHost.
minConnectionNumPerHost: ${client.minConnectionNumPerHost:250}
# Transfer-Encoding header. valid values: chucked, compress, deflate, gzip or any valid combination of them. By default, the chucked is used.
transferEncoding: ${client.tansferEncoding:chucked}
2 changes: 0 additions & 2 deletions client/src/test/resources/config/client-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,3 @@ request:
# minimum quantity of connection in connection pool for each host. The corresponding connection number will shrink to minConnectionNumPerHost
# by remove least recently used connections when the connection number of a host reach 0.75 * maxConnectionNumPerHost.
minConnectionNumPerHost: ${client.minConnectionNumPerHost:250}
# Transfer-Encoding header. valid values: chucked, compress, deflate, gzip or any valid combination of them. By default, the chucked is used.
transferEncoding: ${client.tansferEncoding:chucked}
2 changes: 0 additions & 2 deletions client/src/test/resources/config/client-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,3 @@ request:
# minimum quantity of connection in connection pool for each host. The corresponding connection number will shrink to minConnectionNumPerHost
# by remove least recently used connections when the connection number of a host reach 0.75 * maxConnectionNumPerHost.
minConnectionNumPerHost: ${client.minConnectionNumPerHost:250}
# Transfer-Encoding header. valid values: chucked, compress, deflate, gzip or any valid combination of them. By default, the chucked is used.
transferEncoding: ${client.tansferEncoding:chucked}
2 changes: 0 additions & 2 deletions client/src/test/resources/config/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,3 @@ request:
# minimum quantity of connection in connection pool for each host. The corresponding connection number will shrink to minConnectionNumPerHost
# by remove least recently used connections when the connection number of a host reach 0.75 * maxConnectionNumPerHost.
minConnectionNumPerHost: 250
# Transfer-Encoding header. valid values: chucked, compress, deflate, gzip or any valid combination of them. By default, the chucked is used.
transferEncoding: chucked

0 comments on commit 5960cc4

Please sign in to comment.