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
fix: compute correct Content-Length for StringIO with multi-byte chars
StringIO.tell() returns the character position, not the byte offset,
so super_len() returned the wrong value for StringIO objects containing
multi-byte UTF-8 characters (e.g. emoji). This caused an incorrect
Content-Length header that violates RFC 9110 section 8.6.
Read the remaining text and encode it to UTF-8 to measure the true
byte length, consistent with how plain str bodies are already handled.
Closes#6917
0 commit comments