Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Potential memory leak #16

@Katsute

Description

@Katsute

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

@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 expectedoptimizationOptimizations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions