Repository navigation
Handle invalid HTTP received from server - #323
Conversation
|
NetflixOSS » feign » feign-pull-requests #204 SUCCESS |
|
thx for the PR.. so in this case, we are wrong, I think. It is valid (albeit super weird) to have an empty reason. It smells of error, though! http://tools.ietf.org/html/rfc7230#section-3.1.2 This is hard to test as I'm not sure we could get MockWebServer to return a null reason either.. Regardless, I might throw an IOException instead, as we are assuming there is a transport problem. |
There was a problem hiding this comment.
so basically, just throw an IOE here.
|
In my case the server is returning nothing through the connection due to server error. I haven't checked but I guess java.net is also returning status code -1 per the javadocs
https://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html#getResponseMessage()
https://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html#getResponseCode() Any exception is fine |
If response was empty it caused a NPE
|
updated and rebased |
|
NetflixOSS » feign » feign-pull-requests #205 SUCCESS |
Handle invalid HTTP received from server
Handle invalid HTTP received from server
If response was empty it caused a NPE