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

Remove invalid option for curl_setopt_array #25

Merged

Conversation

rtio
Copy link
Contributor

@rtio rtio commented Mar 14, 2024

why

This change removes an invalid option for curl_setopt_array.

This closes #24

All valid options.

@michaelbutler
Copy link
Owner

Sorry for the huge delay, this looks good, but...

I do see that CURLINFO_EFFECTIVE_URL is a valid option but for curl_getinfo not for curl_setopt. can we confirm that curl_getinfo isn't called with this option set? @rtio

@rtio
Copy link
Contributor Author

rtio commented Apr 2, 2024

Hi @michaelbutler hope you're doing well and thank you for the review, much appreciated!

I do see that CURLINFO_EFFECTIVE_URL is a valid option but for curl_getinfo not for curl_setopt. can we confirm that curl_getinfo isn't called with this option set? @rtio

There are 5 calls to curl_getinfo in the code and none of them pass CURLINFO_EFFECTIVE_URL as a parameter or leverage on that result. BTW, this field is returned when using this function with no parameters. So I'd say it would be safe to remove it.

@michaelbutler michaelbutler merged commit 3212b98 into michaelbutler:master Apr 22, 2024
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.

curl_setopt_array(): Argument #2 ($options) must contain only valid cURL options
2 participants