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

Expose the CURLOPT_HTTP09_ALLOWED libcurl option #447

Merged
merged 1 commit into from
May 5, 2022

Conversation

jbangelo
Copy link
Contributor

@jbangelo jbangelo commented May 4, 2022

This PR addresses my feature request in #436. It adds the ability to set the CURLOPT_HTTP09_ALLOWED option. Unfortunately there are still use cases for this option.

I took my best guess as to how to properly implement it. Please let me know if there's anything that needs to be changed, or even if exposing this option is acceptable.

@@ -1280,6 +1280,11 @@ impl Easy {
self.inner.pipewait(wait)
}

/// Same as [`Easy2::http_09`](struct.Easy2.html#method.http_09)
pub fn http_09(&mut self, allow: bool) -> Result<(), Error> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I might name this http_09_allowed which would more closely match the libcurl option name.

@sagebind
Copy link
Collaborator

sagebind commented May 5, 2022

Thanks! The implementation looks correct to me, just some minor suggestions.

@jbangelo jbangelo force-pushed the curlopt_http09_allowed branch from 45bf250 to 7fab850 Compare May 5, 2022 05:27
@jbangelo
Copy link
Contributor Author

jbangelo commented May 5, 2022

@sagebind I've updated the method names as you suggested. Thanks for the quick feedback!

Copy link
Collaborator

@sagebind sagebind left a comment

Choose a reason for hiding this comment

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

Looks great!

@alexcrichton alexcrichton merged commit 16133f7 into alexcrichton:main May 5, 2022
@jbangelo jbangelo deleted the curlopt_http09_allowed branch May 6, 2022 21:57
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.

3 participants