Mercurial > p > roundup > code
diff roundup/configuration.py @ 6514:a036712c96f4
Enable HTTP/1.1 support for roundup-server
This enables keepalives and seems to prevent a lot of hangs/slowness
in my configuration.
configuration.py: add new HttpVersionOption. This is used by the
command line/config in roundup-server. Validates http version
string.
roundup-server.py: enable HTTP 1.1 by default. use -V to set HTTP/1.0
on command line or set http_version in config file.
Fix typo in config description for option include_headers.
Add more vertical spacing for error report and usage display.
roundup-server.1: add doc on -V also doc -I which was missing. Remove
uneeded "to" from a sentence on ssl.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 18 Oct 2021 20:12:09 -0400 |
| parents | 8f1b91756457 |
| children | 8687c096a945 |
line wrap: on
line diff
--- a/roundup/configuration.py Sat Oct 16 21:34:14 2021 -0400 +++ b/roundup/configuration.py Mon Oct 18 20:12:09 2021 -0400 @@ -639,6 +639,16 @@ return value +class HttpVersionOption(Option): + """Used by roundup-server to verify http version is set to valid + string.""" + + def str2value(self, value): + if value not in ["HTTP/1.0", "HTTP/1.1"]: + raise OptionValueError(self, value, "Valid vaues for -V or --http_version are: HTTP/1.0, HTTP/1.1") + return value + + class RegExpOption(Option): """Regular Expression option (value is Regular Expression Object)"""
