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

setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR #8992

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Jun 11, 2022

... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTOL is now deprecated.

The curl tool is updated to use the new options.

src/tool_paramhlp.c Fixed Show fixed Hide fixed
src/tool_paramhlp.c Fixed Show fixed Hide fixed
src/tool_paramhlp.c Fixed Show fixed Hide fixed
@bagder bagder added the feature-window A merge of this requires an open feature window label Jun 11, 2022
@dfandrich
Copy link
Contributor

Wouldn't a curl_slist of strings instead of a single string be more useful? It would be easier to parse and probably faster, too.

@bagder
Copy link
Member Author

bagder commented Jun 12, 2022

Wouldn't a curl_slist of strings instead of a single string be more useful? It would be easier to parse and probably faster, too.

Faster to parse, but perhaps a bit more inconvenient to create?

lib/setopt.c Outdated Show resolved Hide resolved
bagder added a commit that referenced this pull request Jun 12, 2022
... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992
include/curl/curl.h Outdated Show resolved Hide resolved
bagder added a commit that referenced this pull request Jun 13, 2022
... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992
bagder added a commit that referenced this pull request Jun 13, 2022
... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992
@dfandrich
Copy link
Contributor

dfandrich commented Jun 13, 2022 via email

@bagder
Copy link
Member Author

bagder commented Jun 13, 2022

Typo here, too: insensitive

Thanks! I fixed both of them actually.

Copy link
Contributor

@dfandrich dfandrich left a comment

Choose a reason for hiding this comment

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

Typo in commit message: CURLINFO_PROTOL

@dfandrich
Copy link
Contributor

Do the protocols accepted by CURLOPT_PROTOCOLS_STR exactly match the ones supplied by curl_version_info()? There should probably be a reference to that function in this man page as being the way to retrieve all allowed protocols.

... as replacements for deprecated CURLOPT_PROTOCOLS and
CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the
32 bit limit the old ones are facing.

CURLINFO_PROTCOOL is now deprecated.

The curl tool is updated to use the new options.

Added test 1597 to verify the libcurl protocol parser.

Closes #8992
@bagder
Copy link
Member Author

bagder commented Jun 13, 2022

Typo in commit message: CURLINFO_PROTOL

Fixed locally now.

Do the protocols accepted by CURLOPT_PROTOCOLS_STR exactly match the ones supplied by curl_version_info()?

Yes - all protocols curl_version_info shows are supported by this option and spelled the exact same way. CURLOPT_PROTOCOLS_STR supports the extra RTMP* ones from the CURLPROTO_* defines as well, and they are not listed by curl_version_info.

There should probably be a reference to that function in this man page as being the way to retrieve all allowed protocols.

Good idea. I'll amend!

@bagder bagder closed this in e6f8445 Jul 4, 2022
@bagder bagder deleted the bagder/protocols branch July 4, 2022 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-window A merge of this requires an open feature window libcurl API
Development

Successfully merging this pull request may close these issues.

None yet

7 participants