mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 07:56:19 +00:00
Fix response log marked as request one
This commit is contained in:
parent
197c86ec64
commit
db97ed7fb3
@ -139,7 +139,7 @@ class LogInterceptor : Interceptor {
|
||||
|
||||
if (!buffer.isProbablyUtf8()) {
|
||||
logHttp(
|
||||
REQUEST,
|
||||
RESPONSE,
|
||||
BODY,
|
||||
requestId,
|
||||
"<-- Body end for request -- Binary -- Omitted: ${responseBody.contentLength()} bytes"
|
||||
@ -147,12 +147,12 @@ class LogInterceptor : Interceptor {
|
||||
}
|
||||
|
||||
if (responseBody.contentLength() < LIMIT_BODY_LOG) {
|
||||
logHttp(REQUEST, BODY, requestId, buffer.clone().readString(charset))
|
||||
logHttp(RESPONSE, BODY, requestId, buffer.clone().readString(charset))
|
||||
} else {
|
||||
logHttp(REQUEST, BODY, requestId, buffer.clone().readString(LIMIT_BODY_LOG, charset))
|
||||
logHttp(RESPONSE, BODY, requestId, buffer.clone().readString(LIMIT_BODY_LOG, charset))
|
||||
}
|
||||
logHttp(
|
||||
REQUEST,
|
||||
RESPONSE,
|
||||
BODY,
|
||||
requestId,
|
||||
"<-- Body end for request -- Omitted: ${max(0, responseBody.contentLength() - LIMIT_BODY_LOG)} bytes"
|
||||
|
Loading…
x
Reference in New Issue
Block a user