-
Notifications
You must be signed in to change notification settings - Fork 736
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
Document new 8.2 curl constants #1911
Conversation
Did not update and curl_version page for the CURL_VERSION new flags, looks like we never kept the full list there. |
So other than the nits, the first 3 commits look good to me. The cURL manual is a mess so I'm not exactly sure where everything is meant to go, maybe @cmb69 knows? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! Looks mostly good (I've left some comments) for now.
The cURL manual is a mess so I'm not exactly sure where everything is meant to go, maybe @cmb69 knows?
Looks good so far (in the long run we need to improve the structure, but given we're close to PHP 8.2.0 GA, let's postpone this).
<row> | ||
<entry valign="top"><constant>CURLOPT_CAINFO_BLOB</constant></entry> | ||
<entry valign="top"> | ||
The name of a PEM file holding one or more certificates to verify the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to define an acronym for PEM ("Privacy-Enhanced Mail"), but than can be done in a completely separate commit; well, actually should be done separately, since there are already so many uses of the term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can prepare that as a separate PR if someone else doesn't beat me to it 👍
Thanks a ton for the reviews! They sure helped a lot. I'll be onto these changes this weekend and try my best to document more constants following the same notes and aim to sweep through most of these. |
9f93d65
to
90b94c2
Compare
I realize some setopt entries define the versions available while others don't. What's the preference regarding this? |
I think if an entry is available in every cURL version past the minimal version for PHP 7.0 then the version availability can be skipped. Otherwise it should be mentioned. |
@Girgias, to make the white-space checker happy, you'd need to squash. |
06ac9b3
to
80bde5b
Compare
80bde5b
to
cfd608d
Compare
lol, I really thought one would be able to request review from multiple reviewers, sorry for all that ^^. I believe I finally powered through the remaining constants with the last couple commits here. Hoping we can re-trigger the checks :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! And just ignore the white-space-checker for now.
<simpara> | ||
<constant>CURLINFO_PROXY_ERROR</constant> - The detailed (SOCKS) proxy error code when the most recent | ||
transfer returned a <constant>CURLE_PROXY</constant> error. The returned value will be exactly one | ||
of the <constant>CURLPX_*</constant> values. The error code will be <constant>CURLPX_OK</constant> if no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #1963 is still in limbo, but if it will be merged, this should be:
of the <constant>CURLPX_*</constant> values. The error code will be <constant>CURLPX_OK</constant> if no | |
of the <constant><replaceable>CURLPX_*</replaceable></constant> values. The error code will be <constant>CURLPX_OK</constant> if no |
@@ -280,6 +280,31 @@ | |||
<entry valign="top"> | |||
</entry> | |||
</row> | |||
<row> | |||
<entry valign="top"><constant>CURLOPT_ALTSVC</constant></entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of CURLOPT_ALTSVC
should be a string, but it is in the boolean section.
</entry> | ||
</row> | ||
<row> | ||
<entry valign="top"><constant>CURLOPT_ALTSVC_CTRL</constant></entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of CURLOPT_ALTSVC_CTRL
should be an int, but it is in the boolean section.
@@ -450,6 +475,17 @@ | |||
<entry valign="top"> | |||
</entry> | |||
</row> | |||
<row> | |||
<entry valign="top"><constant>CURLOPT_SASL_AUTHZID</constant></entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of CURLOPT_SASL_AUTHZID
should be a string, but it is in the boolean section.
</entry> | ||
</row> | ||
<row> | ||
<entry valign="top"><constant>CURLOPT_HSTS</constant></entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of CURLOPT_HSTS
is supposed to be a string, but it is listed in the integer section.
</entry> | ||
</row> | ||
<row> | ||
<entry valign="top"><constant>CURLOPT_AWS_SIGV4</constant></entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of CURLOPT_AWS_SIGV4
is supposed to be a string, but it is listed in the integer section.
<entry valign="top"> | ||
Allow RCPT TO command to fail for some recipients. | ||
</entry> | ||
<entry valign="top"> | ||
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of | ||
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and | ||
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is | ||
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command. | ||
</entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Splitting this description across two columns doesn't look right. Instead consider:
<entry valign="top"> | |
Allow RCPT TO command to fail for some recipients. | |
</entry> | |
<entry valign="top"> | |
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of | |
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and | |
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is | |
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command. | |
</entry> | |
<entry valign="top"> | |
<simpara> | |
Allow RCPT TO command to fail for some recipients. | |
</simpara> | |
<simpara> | |
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of | |
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and | |
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is | |
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command. | |
</simpara> | |
</entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find a way to reapply this suggestion even after marking it as unresolved :(
@@ -1301,6 +1478,16 @@ | |||
Might require an absolute path. | |||
</entry> | |||
</row> | |||
<row> | |||
<entry valign="top"><constant>CURLOPT_CAINFO_BLOB</constant></entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of CURLOPT_CAINFO_BLOB
is supposed to be a string, but it is in the integer section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you take another looksee at this specific one please? It looks like it is under the string section now
Thanks for the review and suffering through this one with me :-) I'll get those fixed tonight. |
|
91d1e52
to
414f8ef
Compare
Oh noes, I forgot that I used the interface to commit the changes prior to my force push @cmb69 :P which apparently completely nuked your suggested edit for a paragraph I can't remember which 😓 Edit: this one #1911 (comment) |
Permission to fix all the |
Probably can do yes, this is going to be a pain for translators anyway since it is cURL. That's probably one of the smallest annoyances |
I think I will fix them all together on a separate PR, just like how I started on the PEM definition |
Co-authored-by: George Peter Banyard <[email protected]>
Apologies for the silence here, I think I had done all final suggestions on this branch. I can PR the other two fixes after this one individually. Let me know if I can help further to get these ones marked as done. |
@cmb69 ping. :) |
@ekinhbayar There is a failure on |
@afilina thanks for the ping! I'll take a look at both and move this forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some wording nits
<entry valign="top"> | ||
Allow RCPT TO command to fail for some recipients. | ||
</entry> | ||
<entry valign="top"> | ||
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of | ||
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and | ||
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is | ||
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command. | ||
</entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-suggest CMB suggestion
<entry valign="top"> | |
Allow RCPT TO command to fail for some recipients. | |
</entry> | |
<entry valign="top"> | |
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of | |
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and | |
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is | |
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command. | |
</entry> | |
<entry valign="top"> | |
<simpara> | |
Allow RCPT TO command to fail for some recipients. | |
</simpara> | |
<simpara> | |
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of | |
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and | |
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is | |
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command. | |
</simpara> | |
</entry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fucking hell GitHub
Ah, by the time I sat down for this it seems all has been resolved :-) thank you and sorry for this taking so, so long! |
It's fine the issues were minors, if you want to do the follow-up on the PEM acronym feel free! |
Hi, thought I can help with #1803 regarding the curl constants. This PR starts with the curlinfo constants added in one commit. Made a list below, but I could use some pointers as to what goes where, which other pages need to be updated, if I'm missing any I had planned below.
Updated constants list and getinfo options
CURLINFO_PROXY_ERROR (libcurl >= 7.73.0) https://curl.se/libcurl/c/CURLINFO_PROXY_ERROR.html
CURLINFO_REFERER (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLINFO_REFERER.html
CURLINFO_RETRY_AFTER (libcurl >= 7.66.0) https://curl.se/libcurl/c/CURLINFO_RETRY_AFTER.html
Update constants list
CURL_VERSION_GSASL (libcurl >= 7.76.0)
CURL_VERSION_HSTS (libcurl >= 7.74.0)
CURL_VERSION_HTTP3 (libcurl >= 7.66.0)
CURL_VERSION_UNICODE (libcurl >= 7.72.0)
CURL_VERSION_ZSTD (libcurl >= 7.72.0)
Update constants list and setopt options
CURLAUTH_AWS_SIGV4 (libcurl >= 7.75.0)
CURLOPT_AWS_SIGV4 (libcurl >= 7.75.0) https://curl.se/libcurl/c/CURLOPT_AWS_SIGV4.html
CURLOPT_CAINFO_BLOB (libcurl >= 7.77.0) https://curl.se/libcurl/c/CURLOPT_CAINFO_BLOB.html
CURLOPT_PROXY_CAINFO_BLOB (libcurl >= 7.77.0) https://curl.se/libcurl/c/CURLOPT_PROXY_CAINFO_BLOB.html
CURLOPT_DOH_SSL_VERIFYHOST (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYHOST.html
CURLOPT_DOH_SSL_VERIFYPEER (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYPEER.html
CURLOPT_DOH_SSL_VERIFYSTATUS (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYSTATUS.html
Update constants list and setopt options
CURLOPT_MAIL_RCPT_ALLLOWFAILS (libcurl >= 7.69.0) https://curl.se/libcurl/c/CURLOPT_MAIL_RCPT_ALLLOWFAILS.html
CURLOPT_MAXAGE_CONN (libcurl >= 7.65.0) https://curl.se/libcurl/c/CURLOPT_MAXAGE_CONN.html
CURLOPT_MAXFILESIZE_LARGE https://curl.se/libcurl/c/CURLOPT_MAXFILESIZE_LARGE.html
CURLOPT_MAXLIFETIME_CONN (libcurl >= 7.80.0) https://curl.se/libcurl/c/CURLOPT_MAXLIFETIME_CONN.html
CURLOPT_SASL_AUTHZID (libcurl >= 7.66.0) https://curl.se/libcurl/c/CURLOPT_SASL_AUTHZID.html
CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 (libcurl >= 7.80.0) https://curl.se/libcurl/c/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.html
CURLOPT_SSL_EC_CURVES (libcurl >= 7.73.0) https://curl.se/libcurl/c/CURLOPT_SSL_EC_CURVES.html
CURLOPT_UPKEEP_INTERVAL_MS (libcurl >= 7.62.0) https://curl.se/libcurl/c/CURLOPT_UPKEEP_INTERVAL_MS.html
CURLOPT_UPLOAD_BUFFERSIZE (libcurl >= 7.62.0) https://curl.se/libcurl/c/CURLOPT_UPLOAD_BUFFERSIZE.html
HSTS related
CURLHSTS_ENABLE (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS_CTRL.html
CURLHSTS_READONLYFILE (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS_CTRL.html
CURLOPT_HSTS_CTRL (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS_CTRL.html
CURLOPT_HSTS (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS.html
Update constants list and setopt options
CURLAUTH_AWS_SIGV4 (libcurl >= 7.75.0)
alt_svc related
CURLOPT_ALTSVC (libcurl >= 7.64.1) https://curl.se/libcurl/c/CURLOPT_ALTSVC.html
CURLOPT_ALTSVC_CTRL (libcurl >= 7.64.1) https://curl.se/libcurl/c/CURLOPT_ALTSVC_CTRL.html
CURLALTSVC_H1 (libcurl >= 7.64.1)
CURLALTSVC_H2 (libcurl >= 7.64.1)
CURLALTSVC_H3 (libcurl >= 7.64.1)
CURLALTSVC_READONLYFILE (libcurl >= 7.64.1)
PROTO_*
CURLPROTO_MQTT (libcurl >= 7.71.0)
PX_* responses when getting detailed socks proxy errors via
CURLINFO_PROXY_ERROR
- https://curl.se/libcurl/c/CURLINFO_PROXY_ERROR.htmlCURLPX_BAD_ADDRESS_TYPE (libcurl >= 7.73.0)
CURLPX_BAD_VERSION (libcurl >= 7.73.0)
CURLPX_CLOSED (libcurl >= 7.73.0)
CURLPX_GSSAPI (libcurl >= 7.73.0)
CURLPX_GSSAPI_PERMSG (libcurl >= 7.73.0)
CURLPX_GSSAPI_PROTECTION (libcurl >= 7.73.0)
CURLPX_IDENTD_DIFFER (libcurl >= 7.73.0)
CURLPX_IDENTD (libcurl >= 7.73.0)
CURLPX_LONG_HOSTNAME (libcurl >= 7.73.0)
CURLPX_LONG_PASSWD (libcurl >= 7.73.0)
CURLPX_LONG_USER (libcurl >= 7.73.0)
CURLPX_NO_AUTH (libcurl >= 7.73.0)
CURLPX_OK (libcurl >= 7.73.0)
CURLPX_RECV_ADDRESS (libcurl >= 7.73.0)
CURLPX_RECV_AUTH (libcurl >= 7.73.0)
CURLPX_RECV_CONNECT (libcurl >= 7.73.0)
CURLPX_RECV_REQACK (libcurl >= 7.73.0)
CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED (libcurl >= 7.73.0)
CURLPX_REPLY_COMMAND_NOT_SUPPORTED (libcurl >= 7.73.0)
CURLPX_REPLY_CONNECTION_REFUSED (libcurl >= 7.73.0)
CURLPX_REPLY_GENERAL_SERVER_FAILURE (libcurl >= 7.73.0)
CURLPX_REPLY_HOST_UNREACHABLE (libcurl >= 7.73.0)
CURLPX_REPLY_NETWORK_UNREACHABLE (libcurl >= 7.73.0)
CURLPX_REPLY_NOT_ALLOWED (libcurl >= 7.73.0)
CURLPX_REPLY_TTL_EXPIRED (libcurl >= 7.73.0)
CURLPX_REPLY_UNASSIGNED (libcurl >= 7.73.0)
CURLPX_REQUEST_FAILED (libcurl >= 7.73.0)
CURLPX_RESOLVE_HOST (libcurl >= 7.73.0)
CURLPX_SEND_AUTH (libcurl >= 7.73.0)
CURLPX_SEND_CONNECT (libcurl >= 7.73.0)
CURLPX_SEND_REQUEST (libcurl >= 7.73.0)
CURLPX_UNKNOWN_FAIL (libcurl >= 7.73.0)
CURLPX_UNKNOWN_MODE (libcurl >= 7.73.0)
CURLPX_USER_REJECTED (libcurl >= 7.73.0)
SSLOPT_* - update constants list and document on getinfo - https://curl.se/libcurl/c/CURLOPT_SSL_OPTIONS.html
CURLSSLOPT_AUTO_CLIENT_CERT (libcurl >= 7.77.0)
CURLSSLOPT_NATIVE_CA (libcurl >= 7.71.0)
CURLSSLOPT_NO_PARTIALCHAIN (libcurl >= 7.68.0)
CURLSSLOPT_REVOKE_BEST_EFFORT (libcurl >= 7.70.0)
CURLE_PROXY (libcurl >= 7.73.0)
CURLFTPMETHOD_DEFAULT
CURLMOPT_MAX_CONCURRENT_STREAMS (libcurl >= 7.67.0)