Catch another weird crash in Android on bad server response

git-svn-id: https://zxing.googlecode.com/svn/trunk@2563 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2013-01-19 23:13:34 +00:00
parent 699e3ff2a8
commit 0302080139

View file

@ -210,6 +210,10 @@ public final class HttpHelper {
// this is maybe this Android bug: http://code.google.com/p/android/issues/detail?id=15554
Log.w(TAG, "Bad URI? " + uri);
throw new IOException(npe.toString());
} catch (NumberFormatException nfe) {
// Again seen this in the wild for bad header fields in the server response!
Log.w(TAG, "Bad server status? " + uri);
throw new IOException(nfe.toString());
}
}