Skip to content

Conversation

ianpartridge
Copy link
Contributor

Currently, if an HTTPBody is set to .string, the length is calculated as
string.count. In Swift, this is the number of extended grapheme clusters, not
the UTF8 byte count. Instead, we should use the count of the UTF8View, as the
bytes will be transmitted in this encoding.

Currently, if an `HTTPBody` is set to .string, the length is calculated as
string.count. In Swift, this is the number of extended grapheme clusters, not
the UTF8 byte count. Instead, we should use the count of the UTF8View, as the
bytes will be transmitted in this encoding.
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@tomerd
Copy link
Contributor

tomerd commented Apr 11, 2019

@swift-server-bot test this please
@ianpartridge added you to safelist so should trigger automatically from now on

Copy link
Contributor

@tomerd tomerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems right to me

@artemredkin
Copy link
Collaborator

same here!

@tomerd
Copy link
Contributor

tomerd commented Apr 11, 2019

@ianpartridge feel free to merge when you want

@ianpartridge ianpartridge merged commit db60d3d into swift-server:master Apr 11, 2019
@ianpartridge ianpartridge deleted the body-string-length branch April 11, 2019 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants