Change FileHandler to ignore error when sending 404.
This commit is contained in:
parent
d54826b66b
commit
e03a902680
1 changed files with 1 additions and 4 deletions
|
|
@ -73,7 +73,6 @@ public class FileHandler implements Handler {
|
|||
}
|
||||
} catch (Exception e) {
|
||||
send404(exchange);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -83,9 +82,7 @@ public class FileHandler implements Handler {
|
|||
exchange.sendResponseHeaders(404, notFound.length);
|
||||
exchange.getResponseBody().write(notFound);
|
||||
exchange.getResponseBody().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
|
||||
private void send404(HttpExchange exchange) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue