possibly fix weird http issue
This commit is contained in:
parent
e95af012e2
commit
ae8bd79d8f
1 changed files with 3 additions and 2 deletions
|
@ -42,9 +42,10 @@ public class ServHandler implements HttpHandler {
|
||||||
|
|
||||||
// handle the request
|
// handle the request
|
||||||
String response = outObject.toString();
|
String response = outObject.toString();
|
||||||
exchange.sendResponseHeaders(200, response.length());
|
byte[] bytes = response.getBytes();
|
||||||
|
exchange.sendResponseHeaders(200, bytes.length);
|
||||||
OutputStream os = exchange.getResponseBody();
|
OutputStream os = exchange.getResponseBody();
|
||||||
os.write(response.getBytes());
|
os.write(bytes);
|
||||||
os.close();
|
os.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue