From c9f998b642625274dc328e446dbf5dcf42e37521 Mon Sep 17 00:00:00 2001 From: boedy Date: Sat, 11 May 2019 15:42:13 +0200 Subject: [PATCH] Return error messages returned by exception --- src/android/NanoHTTPDWebserver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/NanoHTTPDWebserver.java b/src/android/NanoHTTPDWebserver.java index 922c8b7..afce81c 100644 --- a/src/android/NanoHTTPDWebserver.java +++ b/src/android/NanoHTTPDWebserver.java @@ -185,7 +185,7 @@ public class NanoHTTPDWebserver extends NanoHTTPD { } } } catch (IOException ioe) { - res = newFixedLengthResponse(Response.Status.FORBIDDEN, NanoHTTPD.MIME_PLAINTEXT, "FORBIDDEN: Reading file failed."); + res = newFixedLengthResponse(Response.Status.FORBIDDEN, NanoHTTPD.MIME_PLAINTEXT, ioe.getMessage()); } return res;