cloudflare / cloudflare/pingora
Inconsistency in the behavior of session.req_header().uri
Open
ergonomics
- Dominant language
- Rust
- Stars
- 27.4k
- Forks
- 1.7k
- Avg merge
- 6h 22m
- Merged PRs (30d)
- 3
Description
Hello,
I have noticed that `session.req_header().uri` can be quite confusing in its behavior, as it produces different results depending on whether the request is HTTP or HTTPS.
**Example:**
```rust
// For the same request, once over HTTP and once over HTTPS
let url = session.req_header().uri.to_string();
```
* **HTTP**: returns
`/test.html`
* **HTTPS**: returns
`https://127.0.0.1:9002/test.html`
Wouldn’t it be better to standardize this behavior?
Contributor guide
Assessment
This issue has not been assessed yet.