silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
391 stars 313 forks source link

Catch unanticipated EOFException due to empty stream when redirecting. #501

Open customautosys opened 1 year ago

customautosys commented 1 year ago

When one wants to disable followRedirect, sometimes the InputStream will throw an EOFException due to there being no content in the response body. It is undesired for this to result in an error returned to Cordova, as the end user would just want to be able to read the Location header anyway (and follow it if necessary).