warp
warp copied to clipboard
Host in trace info (fixes #847)
Currently, calling info.host()
in trace and log filters does not work for http/2 connections, since they do not send the host in a header, but in the :authority pseudo-header. This change applies the same logic to info.host()
as the one used for the host()
filter. It also adds the host to the span of trace::request()
.
Note that there are two backwards-incompatible API changes:
The return type of filters::trace::Info::host(&self)
changes from Option<&str>
to Option<Authority>
.
The return type of filters::log::Info::host(&self)
changes from Option<&str>
to Option<Authority>
.
@seanmonstar @jxs CR please
@seanmonstar This is still relevant to me, want to make some decisions on the open issues?