The scheme
of a request is not present on an HTTP/1.0 or HTTP/1.1 request.
In HTTP/2 and HTTP/3 that scheme is present as the :scheme
pseudo-header on all requests.
The scheme in Jetty could be any of the supported schemes that the Connectors support (eg: "fcgi", "http", "https", "ws", "wss", etc).
In practice the scheme comes from the request authority.
In HTTP/1.0 and HTTP/1.1 the scheme is determined by a combination of Connector security settings and Forwarding headers, if the request is secure, then the scheme is https
, otherwise it is http
(unless overridden by Forwarding headers to be something else).
On HTTP/2 and HTTP/3 the scheme is built into the low level protocol, but can be overridden by the Forwarded
RFC7239 headers.
There is no provision in CustomRequestLog
to write the authority or scheme currently.
So I opened an enhancement request for it
https://github.com/eclipse/jetty.project/issues/9980