test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/NanoHTTPD.java in calabash-android-0.4.19.pre4 vs test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/NanoHTTPD.java in calabash-android-0.4.19
- old
+ new
@@ -344,9 +344,13 @@
Properties files = new Properties();
// Decode the header into parms and header java properties
decodeHeader(hin, pre, parms, header);
String method = pre.getProperty("method");
+ if(method == null) {
+ System.out.println("HTTP-method was null - ignoring request");
+ return;
+ }
String uri = pre.getProperty("uri");
long size = 0x7FFFFFFFFFFFFFFFl;
String contentLength = header.getProperty("content-length");
if (contentLength != null)