tinyproxy / tinyproxy

tinyproxy - a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems
GNU General Public License v2.0
4.67k stars 645 forks source link

config vlaue STR must be quoted #491

Open hudecof opened 1 year ago

hudecof commented 1 year ago

Hello,

the man page says

       The Tinyproxy configuration file contains key-value pairs, one per line. Lines starting with `#` and empty lines are comments and are ignored. Keywords are case-insensitive, whereas
       values are case-sensitive. Values may be enclosed in double-quotes (") if they contain spaces.

So for example this should be OK, as man paghe says.

PidFile /run/tinyproxy/tinyproxy.pid`

but the definition in the code is

#define WS SPACE "+"
#define STR "\"([^\"]+)\""
#define BOOL "(yes\|on\|no\|off)"
#define INT "(()" DIGIT "+)"
#define ALNUM "([-a-z0-9._]+)"

That means the STR must be quoted.

I'm trying to setup some kind of automated generated configs. I'm able to check the STR, BOOL an INT.

Please, could you fix the config file parsing according the docs or add some note of config value type in docs?

regardrs Peter

rofl0r commented 1 year ago

please propose a PR fixing the documentation (it's generated from docs/man*/*.in)