Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix h2 request_summary #62

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
also add port number
  • Loading branch information
Congyuwang committed Aug 5, 2024
commit 53e1810a27de581f6d5a9606198d9ac443f4a63c
8 changes: 7 additions & 1 deletion pingora-core/src/protocols/http/v2/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
}

Expand Down
Loading