You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this function takes wrong body length - it takes string character count body.length but that does not match utf8 byte-count that is body.encodeUtf8().length in general case, so it causes bugs with some characters inside the body:
constructor(
body: String,
statusCode: Int = 200,
headers: Map<String, String> = emptyMap(),
delayMillis: Long = 0,
) : this(
statusCode = statusCode,
body = flowOf(body.encodeUtf8()),
headers = headers + mapOf("Content-Length" to body.length.toString()),
delayMillis = delayMillis,
)
Steps to reproduce the behavior
No response
Logs
(Your logs here)
The text was updated successfully, but these errors were encountered:
Version
3.4.0
Summary
this function takes wrong body length - it takes string character count
body.length
but that does not match utf8 byte-count that isbody.encodeUtf8().length
in general case, so it causes bugs with some characters inside the body:Steps to reproduce the behavior
No response
Logs
The text was updated successfully, but these errors were encountered: