mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
also add port number
This commit is contained in:
parent
2df4e29e18
commit
53e1810a27
1 changed files with 7 additions and 1 deletions
|
@ -346,10 +346,16 @@ impl HttpSession {
|
|||
/// Return a string `$METHOD $PATH $HOST`. Mostly for logging and debug purpose
|
||||
pub fn request_summary(&self) -> String {
|
||||
format!(
|
||||
"{} {}, Host: {}",
|
||||
"{} {}, Host: {}:{}",
|
||||
self.request_header.method,
|
||||
self.request_header.uri.path(),
|
||||
self.request_header.uri.host().unwrap_or_default(),
|
||||
self.req_header()
|
||||
.uri
|
||||
.port()
|
||||
.as_ref()
|
||||
.map(|port| port.as_str())
|
||||
.unwrap_or_default()
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue