cloudflare / cloudflare/pingora

Inconsistency in the behavior of session.req_header().uri

Open
#776 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.