]> git.ipfire.org Git - thirdparty/curl.git/commit
test1521: verify setting options to NULL better
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Aug 2024 12:58:57 +0000 (14:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Aug 2024 06:24:34 +0000 (08:24 +0200)
commit3b057d4b7a7e6b811245fd03121b428c8940dc60
treed6656c9d47ba25bf449059a513f17ac404e2f4fe
parent17dde53968114080f078afb9acccbe27c044bf4b
test1521: verify setting options to NULL better

Previously this test allowed several error values when setting options.
This made this test miss #14629.

Now, errors are generally not accepted for setopts:

 - numerical setopts accept CURLE_BAD_FUNCTION_ARGUMENT for funny input
 - the first setopt to an option accepts CURLE_NOT_BUILT_IN or
   CURLE_UNKNOWN_OPTION for when they are disabled/not built-in
 - there is an allowlist concept for some return code for some variables,
   managed at the top of the mk-lib1521.pl script

In curl.h: remove the OBSOLETE named values from the setopt list.

Closes #14634
include/curl/curl.h
lib/setopt.c
lib/url.c
lib/urldata.h
tests/data/test1521
tests/libtest/mk-lib1521.pl