mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:17:17 +03:00
badwords: check indented lines in source code, fix fallouts
- badwords.pl: add `-a` option to check all lines in source code files. Before this patch indented lines were skipped (to avoid Markdown code fences.) - GHA/checksrc: use `-a` when verifying the source code. - GHA/checksrc: disable `So` and `But` rules for source code. - GHA/checksrc: add docs/examples to the verified sources. - badwords.txt: delete 4 duplicates. - badwords.txt: group and sort contractions. - badwords.txt: allow ` url = `, `DIR`, `<file name`. Closes #19536
This commit is contained in:
parent
8a968095df
commit
2dc71ba8bf
73 changed files with 146 additions and 144 deletions
|
|
@ -40,7 +40,7 @@ int main(void)
|
|||
/*
|
||||
Each single string should be written using the format
|
||||
HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT where HOST is the host of the
|
||||
request, PORT is the port of the request, CONNECT-TO-HOST is the host name
|
||||
request, PORT is the port of the request, CONNECT-TO-HOST is the hostname
|
||||
to connect to, and CONNECT-TO-PORT is the port to connect to.
|
||||
*/
|
||||
/* instead of curl.se:443, it resolves and uses example.com:443 but in other
|
||||
|
|
@ -53,12 +53,12 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
|
||||
|
||||
/* since this connects to the wrong host, checking the host name in the
|
||||
/* since this connects to the wrong host, checking the hostname in the
|
||||
server certificate fails, so unless we disable the check libcurl
|
||||
returns CURLE_PEER_FAILED_VERIFICATION */
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
|
||||
/* Letting the wrong host name in the certificate be okay, the transfer
|
||||
/* Letting the wrong hostname in the certificate be okay, the transfer
|
||||
goes through but (most likely) causes a 404 or similar because it sends
|
||||
an unknown name in the Host: header field */
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue