nkzawa/engine.io-client.java — pull request #8 by andrepew (2014-08-10 08:38:57+00:00)
Title: When an Android app doesn't have the INTERNET permission, getHeaderFields() returns null resulting in NPE

I am testing a new app that didn't have the internet permission. I debugged it and ran in to xhr.getHeaderFields() returning a null; which led to an NPE.

I added a check for null to make the permission error a bit more transparent. Now an access denied error will propagate up instead of just a silent failure since the finally block basically throws the NPE away.