Android 19 on a 4.4.2 simulator seems to return a null when getHeaderFields is called on a headerless request instead of an empty map which results in an NPE.
This commit is contained in:
@@ -201,10 +201,15 @@ public class PollingXHR extends Polling {
|
||||
}
|
||||
|
||||
Map<String, String> headers = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
|
||||
for (String key : xhr.getHeaderFields().keySet()) {
|
||||
|
||||
xhrHeaderFields = xhr.getHeaderFields();
|
||||
if(xhrHeaderFields != null) {
|
||||
for (String key : xhrHeaderFields.keySet()) {
|
||||
if (key == null) continue;
|
||||
headers.put(key, xhr.getHeaderField(key));
|
||||
}
|
||||
}
|
||||
|
||||
self.onResponseHeaders(headers);
|
||||
|
||||
final int statusCode = xhr.getResponseCode();
|
||||
|
||||
Reference in New Issue
Block a user