ClientSnapshot::server_port() returns 443 for http:// URLs without port

Open Beginner friendly
#6,709 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start in src/gax-internal/src/observability/client_signals/recorder.rs at ClientSnapshot::server_port(), focusing on how the endpoint URI scheme is handled when no port is explicit. Verify the reported value for HTTP and HTTPS endpoints, then add or update coverage for the HTTP case and run the relevant Rust tests. Done means HTTP defaults to 80 while HTTPS retains 443.

Written by the indexing model from the issue text.

Description

type: bug

Unconfirmed. This is the result of a search with Claude, may be a false positive.

In src/gax-internal/src/observability/client_signals/recorder.rs, server_port() resolves the server port attribute:

https://github.com/googleapis/google-cloud-rust/blob/f02b42c2ac5720334cd2b5335824bd4166264527/src/gax-internal/src/observability/client_signals/recorder.rs#L375-L382

If the endpoint URI does not include an explicit port, it falls back unconditionally to HTTPS_PORT (443). For plain HTTP endpoints (e.g. local emulators or HTTP proxies with scheme http://), the port is reported as 443 instead of 80.

Dominant language
Rust
Stars
956
Forks
144
Avg merge
1d 1h
Merged PRs (30d)
260

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-cloud-rust

All issues in googleapis/google-cloud-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.