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

Drop the request reader earlier #125

Merged
merged 1 commit into from
Dec 7, 2016

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Dec 6, 2016

Before:

  • Client sends request A and B to the same socket. Request A has a body.
  • Server reads the headers of request A (but not the body) and builds a Response.
  • Server sends the response back to the client.
  • Server then processes request B.

After:

  • Client sends request A and B to the same socket. Request A has a body.
  • Server reads the headers of request A (but not the body) and builds a Response.
  • Server processes request B while it sends the response back to the client in another thread.

In other words, without this change you can't start processing the next request before the first response has been entirely transmitted back.

@frewsxcv frewsxcv merged commit 4e7c504 into tiny-http:master Dec 7, 2016
@tomaka tomaka deleted the reader-early-drop branch December 7, 2016 06:16
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