File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
client/src/test/java/org/asynchttpclient Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ public void handle(HttpExchange exchange)
61
61
out .write (compressedData , 0 , (int ) n );
62
62
out .flush ();
63
63
out .close ();
64
- exchange .close ();
65
64
}
66
65
});
67
66
@@ -72,14 +71,10 @@ public void handle(HttpExchange exchange)
72
71
exchange .getResponseHeaders ().set ("Content-Encoding" , "gzip" );
73
72
exchange .sendResponseHeaders (200 , 0 );
74
73
OutputStream out = exchange .getResponseBody ();
75
- try {
76
- GZIPOutputStream gzip = new GZIPOutputStream (out );
77
- gzip .write (UNCOMPRESSED_PAYLOAD .getBytes (StandardCharsets .UTF_8 ));
78
- gzip .flush ();
79
- gzip .close ();
80
- } catch (Exception exception ) {
81
- exception .printStackTrace ();
82
- }
74
+ GZIPOutputStream gzip = new GZIPOutputStream (out );
75
+ gzip .write (UNCOMPRESSED_PAYLOAD .getBytes (StandardCharsets .UTF_8 ));
76
+ gzip .flush ();
77
+ gzip .close ();
83
78
}
84
79
});
85
80
You can’t perform that action at this time.
0 commit comments