mirror of
https://github.com/square/okhttp.git
synced 2025-11-27 18:21:14 +03:00
Fix HttpLoggingInterceptor to be cool with newlines.
Unfortunately our plaintext detector treats \r and \n as non-plaintext characters, and they're completely fine. Closes: https://github.com/square/okhttp/issues/2579
This commit is contained in:
@@ -283,7 +283,8 @@ public final class HttpLoggingInterceptor implements Interceptor {
|
||||
if (prefix.exhausted()) {
|
||||
break;
|
||||
}
|
||||
if (Character.isISOControl(prefix.readUtf8CodePoint())) {
|
||||
int codePoint = prefix.readUtf8CodePoint();
|
||||
if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user