Return error messages returned by exception

This commit is contained in:
boedy 2019-05-11 15:42:13 +02:00
parent fd3d9e0366
commit c9f998b642

View File

@ -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;