Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Chunked Parser, Encoding Matcher Was Incorrect #3538

Merged

Conversation

ChristopherDavenport
Copy link
Member

@ChristopherDavenport ChristopherDavenport commented Jun 26, 2020

Previosuly even if the transfer-encoding was chunked it was not seen a chunked. As a result it defaulted to the .getOrElse(0) which created an empty body.

This rectifies this on both Request and Response parser and adds some more trace logging for the response because it had less to debug with.

Copy link
Member

@rossabaker rossabaker left a comment

LGTM. A couple nits. This looks binary compatible and could be part of an 0.21.6, I think.

@@ -127,7 +127,7 @@ private[ember] object Parser {
isChunked =
headers
.get(org.http4s.headers.`Transfer-Encoding`)
.exists(_.value.toList.contains(TransferCoding.chunked))
.exists(_.values.exists(_ === TransferCoding.chunked))
Copy link
Member

@rossabaker rossabaker Jun 27, 2020

Choose a reason for hiding this comment

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

Wait, what? Did that convert to a String and then to a Seq[Char]?

Copy link
Member Author

@ChristopherDavenport ChristopherDavenport Jun 27, 2020

Choose a reason for hiding this comment

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

I think so I didn't get the typing working, but I have no idea how it worked.

@ChristopherDavenport ChristopherDavenport changed the base branch from master to series/0.21 Jun 27, 2020
Copy link
Member

@rossabaker rossabaker left a comment

👍 on green

@rossabaker rossabaker merged commit 9441507 into http4s:series/0.21 Jun 28, 2020
10 checks passed
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.

None yet

2 participants