From 9d3717abd59e1672f5d8d7888ce613afdc7fb3c5 Mon Sep 17 00:00:00 2001 From: ulrich Date: Wed, 24 Jan 2024 13:00:11 +0000 Subject: [PATCH] HttpResponder.finish aufgeteilt --- src/de/uhilger/httpserver/base/HttpResponder.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/de/uhilger/httpserver/base/HttpResponder.java b/src/de/uhilger/httpserver/base/HttpResponder.java index e39559d..88ad962 100644 --- a/src/de/uhilger/httpserver/base/HttpResponder.java +++ b/src/de/uhilger/httpserver/base/HttpResponder.java @@ -89,6 +89,10 @@ public void finish(InputStream in, OutputStream out) throws IOException { in.close(); + finish(out); + } + + public void finish(OutputStream out) throws IOException { out.flush(); out.close(); } @@ -132,8 +136,7 @@ exchange.sendResponseHeaders(code, bytes.length); OutputStream os = exchange.getResponseBody(); os.write(bytes); - os.flush(); - os.close(); + finish(os); } -- Gitblit v1.9.3