mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +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()) {
|
if (!buffer.isProbablyUtf8()) {
|
||||||
logHttp(
|
logHttp(
|
||||||
REQUEST,
|
RESPONSE,
|
||||||
BODY,
|
BODY,
|
||||||
requestId,
|
requestId,
|
||||||
"<-- Body end for request -- Binary -- Omitted: ${responseBody.contentLength()} bytes"
|
"<-- Body end for request -- Binary -- Omitted: ${responseBody.contentLength()} bytes"
|
||||||
@ -147,12 +147,12 @@ class LogInterceptor : Interceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (responseBody.contentLength() < LIMIT_BODY_LOG) {
|
if (responseBody.contentLength() < LIMIT_BODY_LOG) {
|
||||||
logHttp(REQUEST, BODY, requestId, buffer.clone().readString(charset))
|
logHttp(RESPONSE, BODY, requestId, buffer.clone().readString(charset))
|
||||||
} else {
|
} else {
|
||||||
logHttp(REQUEST, BODY, requestId, buffer.clone().readString(LIMIT_BODY_LOG, charset))
|
logHttp(RESPONSE, BODY, requestId, buffer.clone().readString(LIMIT_BODY_LOG, charset))
|
||||||
}
|
}
|
||||||
logHttp(
|
logHttp(
|
||||||
REQUEST,
|
RESPONSE,
|
||||||
BODY,
|
BODY,
|
||||||
requestId,
|
requestId,
|
||||||
"<-- Body end for request -- Omitted: ${max(0, responseBody.contentLength() - LIMIT_BODY_LOG)} bytes"
|
"<-- Body end for request -- Omitted: ${max(0, responseBody.contentLength() - LIMIT_BODY_LOG)} bytes"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user