facebookarchive / stetho

Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.
http://facebook.github.io/stetho/
MIT License
12.66k stars 1.13k forks source link

CheckCharset on PostData to prevent hanging or crashing #564

Open thebehera opened 6 years ago

thebehera commented 6 years ago

This should resolve the error around: https://github.com/facebook/stetho/issues/329 Use CharsetDecoder to decode the byte[]. if it reports an error, bail out and report to the chrome inspector that Charset in POST/PUT is not UTF-8. Data (length:X) cannot be represented as a string.

thebehera commented 6 years ago

Showing a NPE, debugging now, and will update the PR

thebehera commented 6 years ago

fixed NPE around getting a null body

jasta commented 6 years ago

Awesome work, so glad someone tackled this!