Basisklassen zum Modul jdk.httpserver
ulrich
2021-06-15 e88b7bbe6c14abeae6af908483b89256874ce360
src/de/uhilger/httpserver/base/HttpResponder.java
@@ -130,13 +130,7 @@
   * @throws IOException falls etwas schief geht entsteht dieser Fehler
   */
  public void sendNotFound(HttpExchange e, String fname) throws IOException {
    OutputStream os = e.getResponseBody();
    String response = fname + STR_NOT_FOUND;
    byte[] bytes = response.getBytes(StandardCharsets.UTF_8);
    e.sendResponseHeaders(SC_NOT_FOUND, bytes.length);
    os.write(bytes);
    os.flush();
    os.close();
    antwortSenden(e, SC_NOT_FOUND, fname + STR_NOT_FOUND);
  }  
  public void antwortSenden(HttpExchange exchange, int code, String antwort) throws IOException {