mirror of
https://github.com/square/okhttp.git
synced 2025-11-27 18:21:14 +03:00
Split HttpEngine into 3 interceptors.
BridgeInterceptor does some basic header management and implements gzip on responses. CacheInterceptor implements HTTP response caching. ConnectInterceptor takes the StreamAllocation that's already allocated and uses it to create an HttpStream.
This commit is contained in:
@@ -31,7 +31,7 @@ import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
import okhttp3.ResponseBody;
|
||||
import okhttp3.internal.Platform;
|
||||
import okhttp3.internal.http.HttpEngine;
|
||||
import okhttp3.internal.http.OkHeaders;
|
||||
import okio.Buffer;
|
||||
import okio.BufferedSource;
|
||||
|
||||
@@ -229,7 +229,7 @@ public final class HttpLoggingInterceptor implements Interceptor {
|
||||
logger.log(headers.name(i) + ": " + headers.value(i));
|
||||
}
|
||||
|
||||
if (!logBody || !HttpEngine.hasBody(response)) {
|
||||
if (!logBody || !OkHeaders.hasBody(response)) {
|
||||
logger.log("<-- END HTTP");
|
||||
} else if (bodyEncoded(response.headers())) {
|
||||
logger.log("<-- END HTTP (encoded body omitted)");
|
||||
|
||||
Reference in New Issue
Block a user