possibly fix weird http issue

This commit is contained in:
biglyderv 2025-02-08 23:45:13 -05:00
parent e95af012e2
commit ae8bd79d8f
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5

View file

@ -42,9 +42,10 @@ public class ServHandler implements HttpHandler {
// handle the request
String response = outObject.toString();
exchange.sendResponseHeaders(200, response.length());
byte[] bytes = response.getBytes();
exchange.sendResponseHeaders(200, bytes.length);
OutputStream os = exchange.getResponseBody();
os.write(response.getBytes());
os.write(bytes);
os.close();
}
}