athena-framework / athena

An ecosystem of reusable, independent components
https://athenaframework.org
MIT License
211 stars 17 forks source link

Handle multi-byte strings in non-streamed responses #288

Closed Blacksmoke16 closed 1 year ago

Blacksmoke16 commented 1 year ago

Fixes #287

Previously it was using String#size which represents the number of characters in the string, rather than the number of bytes which content-length expects. This previously hasn't been discovered due to there not being a difference between #size and #bytesize for the more common characters.