According RFC-7617 (inherited from RFC-2978) schema and parameter names are handled
case insensitively:
```
Note that both scheme and parameter names are matched case-
insensitively.
```
Signed-off-by: Martin Bašti <mbasti@redhat.com>
These were originally based on 19.9.0 code and were rebased
with conflicts resolved.
Fixed#1690.
Co-Authored-By: dilyanpalauzov <git-dpa@aegee.org>
Signed-off-by: Brett Randall <javabrett@gmail.com>
logging.StreamHandler deault to sys.stderr, so make sure access log are printed to stdout when choosing "-" by forcing the stream.
Note: access logs were printed to stdout by default when using the config file.
fix#1184
Some systems edisable like SELINUX disable some flags so ignore the possible
error while chowning a log file. The error will be raised later anyway.
fix#1171
Bytes must be passed to socket.send.
Update tests to ensure an actual socket is used, so that errors like
this can be caught in unit tests in the future.
The debug setting has been removed and now only the debug level can be used to know if
we are in debug mode or not. This change update the gaiohttp worker to handle
that. While I'm here, expose the loglevel from the Logger class.
fix#977
Previously, resp.response_length is used for the b atom of the access
log formatter. If the application does not set a content-length header,
response_length is left as `None`, resulting in b being set to the
fallback "-". resp.sent is a more reliable way to determine the number
of bytes in the response body.
Rather than using fileConfig twice and risking different defaults
and behavior around disable_existing_loggers (ref #902), simply
set the default logging config file to be the paster config file
if it has a logger section and let glogging set up the rest.
Apache will log %D microseconds over 1 million for requests that take over a second, this change sync's that access log behavior since the formatting seems to be based on that. So a request that takes 1 second and 30 milliseconds will have 1000030 for this atom.
This pull request also adds a %L atom for decimal seconds for a quick human-readable latency number. In the above example it would output 1.000030 to the log.