swift-server / swift-server/async-http-client

AsyncHTTPClient calls flush after writing each part of the HTTP message

Open
#203 0 comments 3 reactions 1 assignee View on GitHub

@artemredkin is already working on this.

Since May 7, 2020.

kind/enhancement
Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

Repeatedly calling flush doesn't seem very optimal.

  • HTTPClient.execute calls writeAndFlush and because the body write isn't queued until the head has been written, the flush occurs immediately after the head has been written.
  • TaskHandler.writeBody calls writeAndFlush.

Ideally a simple HTTP request with one ByteBuffer shouldn't need to call flush until after the end part.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.