mirror of
https://github.com/curl/curl.git
synced 2026-07-16 02:27:16 +03:00
badwords: rework exceptions, fix many of them
Also: - support per-directory and per-upper-directory whitelist entries. - convert badlist input grep tweak into the above format. (except for 'And' which had just a few hits.) - fix many code exceptions, but do not enforce. (there also remain about 350 'will' uses in lib) - fix badwords in example code, drop exceptions. - badwords-all: convert to Perl. To make it usable from CMake. - FAQ: reword to not use 'will'. Drop exception. Closes #20886
This commit is contained in:
parent
11c14b5ca5
commit
435eabeac8
89 changed files with 367 additions and 344 deletions
|
|
@ -47,7 +47,7 @@ foreach(_target IN LISTS COMPLICATED_MAY_BUILD check_PROGRAMS _all) # keep 'COM
|
|||
# CMake generates a static library for the OBJECT target. Silence these 'lib.exe' warnings:
|
||||
# warning LNK4006: main already defined in ....obj; second definition ignored
|
||||
# warning LNK4221: This object file does not define any previously undefined public symbols,
|
||||
# so it will not be used by any link operation that consumes this library
|
||||
# [...] not be used by any link operation that consumes this library
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
set_target_properties(${_target_name} PROPERTIES STATIC_LIBRARY_OPTIONS "-ignore:4006;-ignore:4221")
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ static struct ip *ip_list_append(struct ip *list, const char *data)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* determine the number of bits that this IP will match against */
|
||||
/* determine the number of bits that this IP matches against */
|
||||
cidr = strchr(ip->str, '/');
|
||||
if(cidr) {
|
||||
ip->maskbits = atoi(cidr + 1);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
|||
|
||||
static int setup(struct input *t, int num, const char *upload)
|
||||
{
|
||||
char url[256];
|
||||
char upload_url[256];
|
||||
char filename[128];
|
||||
struct stat file_info;
|
||||
curl_off_t uploadsize;
|
||||
|
|
@ -217,17 +217,18 @@ static int setup(struct input *t, int num, const char *upload)
|
|||
snprintf(filename, sizeof(filename), "dl-%d", num);
|
||||
t->out = fopen(filename, "wb");
|
||||
if(!t->out) {
|
||||
fprintf(stderr, "error: could not open file %s for writing: %s\n",
|
||||
upload, strerror(errno));
|
||||
fprintf(stderr, "error: could not open file %s for writing: %s\n", upload,
|
||||
strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
snprintf(url, sizeof(url), "https://localhost:8443/upload-%d", num);
|
||||
snprintf(upload_url, sizeof(upload_url), "https://localhost:8443/upload-%d",
|
||||
num);
|
||||
|
||||
t->in = fopen(upload, "rb");
|
||||
if(!t->in) {
|
||||
fprintf(stderr, "error: could not open file %s for reading: %s\n",
|
||||
upload, strerror(errno));
|
||||
fprintf(stderr, "error: could not open file %s for reading: %s\n", upload,
|
||||
strerror(errno));
|
||||
fclose(t->out);
|
||||
t->out = NULL;
|
||||
return 1;
|
||||
|
|
@ -257,7 +258,7 @@ static int setup(struct input *t, int num, const char *upload)
|
|||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadsize);
|
||||
|
||||
/* send in the URL to store the upload as */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, upload_url);
|
||||
|
||||
/* upload please */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
static const char olivertwist[] =
|
||||
"Among other public buildings in a certain town, which for many reasons "
|
||||
"it will be prudent to refrain from mentioning, and to which I will assign "
|
||||
"it is prudent to refrain from mentioning, and to which I assign "
|
||||
"no fictitious name, there is one anciently common to most towns, great or "
|
||||
"small: to ___, a workhouse; and in this workhouse was born; on a day and "
|
||||
"date which I need not trouble myself to repeat, inasmuch as it can be of "
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ retry:
|
|||
result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
|
||||
if(result == CURLE_OK) {
|
||||
/* on small PING content, this example assumes the complete
|
||||
* PONG content arrives in one go. Larger frames will arrive
|
||||
* PONG content arrives in one go. Larger frames arrive
|
||||
* in chunks, however. */
|
||||
if(meta->flags & CURLWS_PONG) {
|
||||
int same = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue