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

Ember raise end of stream errors wherever appropriate #5043

Merged
merged 7 commits into from Aug 10, 2021

Conversation

RaasAhsan
Copy link
Member

Changes:

  1. Simplified fixed-length body parsing logic
  2. Fixed several bugs where a body stream silently ended if the peer closed its end of the socket without finishing writing. This raises an error now

@RaasAhsan RaasAhsan changed the title Ember handle end of stream errors Ember raise end of stream errors wherever appropriate Aug 8, 2021
Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

Looks reasonable, but let's see what @ChristopherDavenport says.

override def getMessage: String = "Cannot Parse Empty Stream"
}

final case class ReachedEndOfStream() extends EmberException {
Copy link
Member

Choose a reason for hiding this comment

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

There's a standard IOException for this, but since EmberException is a RuntimeException, we can't extend it.

@rossabaker rossabaker merged commit 0c0a416 into http4s:series/0.22 Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants