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

don't stream certain in-memory io.Readers #44

Merged
merged 3 commits into from
Jan 3, 2024

Commits on Dec 19, 2023

  1. Configuration menu
    Copy the full SHA
    1de5487 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c339b66 View commit details
    Browse the repository at this point in the history
  3. don't stream certin in-memory io.Readers

    `bytes.Buffer`, `bytes.Reader`, and `strings.Reader` are all `io.Reader`
    implementions on an in-memory buffer.  Their sizes are known ahead of
    time, and these types tend to be used for small payloads.  We can copy
    these payloads into an `fsthttp.Body` and send them with a
    `Content-Length` header rather than using chunked encoding by sending
    them with `SendAsync` rather than `SendAsyncStreaming`.
    joeshaw committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f5340a7 View commit details
    Browse the repository at this point in the history