From 1bee3d06049547ac4462e690d2ee9f4edc3fb19e Mon Sep 17 00:00:00 2001 From: Keith Wait Date: Sun, 9 Sep 2018 19:54:26 -0500 Subject: [PATCH] use correct method for key query --- 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 a018fe3..922c8b7 100644 --- a/src/android/NanoHTTPDWebserver.java +++ b/src/android/NanoHTTPDWebserver.java @@ -219,7 +219,7 @@ public class NanoHTTPDWebserver extends NanoHTTPD { Response response = null; Log.d(this.getClass().getName(), "responseObject: " + responseObject.toString()); - if (responseObject.containsKey("path")) { + if (responseObject.has("path")) { // TODO should specify a more correct mime-type try { return serveFile(session.getHeaders(), new File(responseObject.getString("path")), responseObject.getString("type"));