Skip to content

Commit 52afb50

Browse files
committed
Change tested header for MultipleHeaderTests from Content-Length to
X-Duplicated-Header as Netty added normalization against the Content-Length header
1 parent 09ed2bb commit 52afb50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/test/java/org/asynchttpclient/MultipleHeaderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public void setUpGlobal() throws Exception {
5353
socket.shutdownInput();
5454
if (req.endsWith("MultiEnt")) {
5555
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream());
56-
outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 2\n"
57-
+ "Content-Length: 1\n" + "\n0\n");
56+
outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "X-Duplicated-Header: 2\n"
57+
+ "X-Duplicated-Header: 1\n" + "\n0\n");
5858
outputStreamWriter.flush();
5959
socket.shutdownOutput();
6060
} else if (req.endsWith("MultiOther")) {
@@ -148,7 +148,7 @@ public State onStatusReceived(HttpResponseStatus objectHttpResponseStatus) {
148148
public State onHeadersReceived(HttpHeaders response) {
149149
try {
150150
int i = 0;
151-
for (String header : response.getAll(CONTENT_LENGTH)) {
151+
for (String header : response.getAll("X-Duplicated-Header")) {
152152
clHeaders[i++] = header;
153153
}
154154
} finally {

0 commit comments

Comments
 (0)