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

Move contenc_writer infra to Curl_client_write() #11908

Closed
wants to merge 1 commit into from

Conversation

icing
Copy link
Contributor

@icing icing commented Sep 21, 2023

Now that CLIENTWRITE_BODY is only used for response body bytes, move the infrastructure for struct contenc_writer into Curl_client_write(). Available to any protocol.

  • move definitions from content_encoding.h to sendf.h
  • move create/cleanup/add code into sendf.c
  • installed content_encoding writers will always be called on Curl_client_write(CLIENTWRITE_BODY)
  • Curl_client_cleanup() frees writers and tempbuffers from paused transfers, irregardless of protocol

A rename of the struct is planned later (naming!), but I wanted the move to be easier to read in this PR.

@jay
Copy link
Member

jay commented Sep 22, 2023

@monnerat

@jay jay added the tidy-up label Sep 22, 2023
- move definitions from content_encoding.h to sendf.h
- move create/cleanup/add code into sendf.c
- installed content_encoding writers will always be called
  on Curl_client_write(CLIENTWRITE_BODY)
- Curl_client_cleanup() frees writers and tempbuffers from
  paused transfers, irregardless of protocol
Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

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

I like it!

@bagder bagder closed this in 0bd9e13 Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants