Merge branch 'master' of github.com:nkzawa/engine.io-client.java

This commit is contained in:
Naoyuki Kanezawa
2014-08-16 20:04:34 +09:00
2 changed files with 9 additions and 4 deletions

View File

@@ -197,10 +197,15 @@ public class PollingXHR extends Polling {
}
Map<String, String> headers = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
for (String key : xhr.getHeaderFields().keySet()) {
if (key == null) continue;
headers.put(key, xhr.getHeaderField(key));
Map<String, List<String>> 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();