Skip to content

Commit ef30e95

Browse files
author
Felix
committed
fix:HttpLoggingInterceptor bodyIsStreaming add other stream type assert
1 parent 02df2bb commit ef30e95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,6 @@ class HttpLoggingInterceptor
328328

329329
private fun bodyIsStreaming(response: Response): Boolean {
330330
val contentType = response.body.contentType()
331-
return contentType != null && contentType.type == "text" && contentType.subtype == "event-stream"
331+
return contentType != null && ((contentType.type == "text" && contentType.subtype == "event-stream") || (contentType.type == "application" && contentType.subtype == "octet-stream"))
332332
}
333333
}

0 commit comments

Comments
 (0)