This repository was archived by the owner on Jul 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Jul 31, 2022. It is now read-only.
Potential memory leak #16
Copy link
Copy link
Closed
Labels
bugSomething isn't working as expectedSomething isn't working as expectedoptimizationOptimizationsOptimizations
Description
Prerequisites
If all checks are not passed then the issue will be closed
- I have checked that no other similar issue already exists
Operating System: Operating system name and version
Windows 10
Release Version: Release version or branch where the issue occurred
v02.00.00+
Issue
Explain your issue. Add any screenshots here
simplehttpserver/src/main/java/com/kttdevelopment/simplehttpserver/SimpleHttpExchangeImpl.java
Lines 357 to 373 in b8986ef
@Override | |
public void send(final byte[] response, final int responseCode, final boolean gzip) throws IOException{ | |
if(gzip){ | |
exchange.getResponseHeaders().set("Accept-Encoding","gzip"); | |
exchange.getResponseHeaders().set("Content-Encoding","gzip"); | |
exchange.getResponseHeaders().set("Connection","keep-alive"); | |
sendResponseHeaders(responseCode, 0); | |
GZIPOutputStream OUT = new GZIPOutputStream(exchange.getResponseBody()); | |
OUT.write(response); | |
OUT.finish(); | |
}else{ | |
sendResponseHeaders(responseCode,response.length); | |
final OutputStream OUT = exchange.getResponseBody(); | |
OUT.write(response); | |
OUT.flush(); | |
} | |
} |
Stream is not closed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working as expectedSomething isn't working as expectedoptimizationOptimizationsOptimizations