431 and 414 responses sent by hyper or h2 never reach the Service, so metrics middleware can't record them
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend-api-design
Línea de trabajo
Start by reading the hyper and h2 rejection paths named in the issue: proto/h1/role.rs and proto/streams/streams.rs. Trace how each path produces a 431 or 414 and consider where the server could expose the status to applications. Done means an application can observe these responses, including their status codes, for both HTTP/1.1 and HTTP/2.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
When a request is too large for the server's limits, hyper (HTTP/1.1) or h2 (HTTP/2) writes the error response itself, and the request never reaches the Service. Middleware that records each request never sees these responses, for e.g. an OpenTelemetry histogram or a tracing span.
Here's what is observable today (hyper 1.12.0, h2 0.4.20):
| Protocol | Rejection | Who responds | What the application gets |
|---|---|---|---|
| HTTP/1.1 | More than max_headers headers, or a head larger than max_buf_size | hyper, 431 (Server::on_error in proto/h1/role.rs) | The connection future returns Err, and is_parse_too_large() is true |
| HTTP/1.1 | URI longer than 65,534 bytes | hyper, 414 | The same: is_parse_too_large() is true. Only the Display text, "URI too long", distinguishes it from the 431 |
| HTTP/2 | Header list larger than max_header_list_size | h2, 431 followed by RST_STREAM (Streams::recv_headers in proto/streams/streams.rs) | Nothing. The connection keeps serving other streams and ends with Ok(()) |
For HTTP/1.1 we can approximate a metric from the connection error. To tell a 414 from a 431, though, we have to match on the error's Display string, and we have none of the request's attributes, such as its method. For HTTP/2 there is nothing to hook into: no error, event or callback reaches hyper or the application when h2 answers with a 431.
Describe the solution you'd like
Some way for a server application to learn that hyper or h2 answered a request on its own, and with which status code - not entirely sure what this should look like yet.
Describe alternatives you've considered
Not aware of any other ways to solve this yet
- Lenguaje dominante
- Rust
- Estrellas
- 16.4k
- Forks
- 1.8k
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hyperium/hyper
-
Publicly reexport the http crateAbiertoC-feature
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
hyperium/hyper#2652 · 4 reacciones ·
Los mantenedores suelen responder en 1 día
-
False `SendRequest` readiness for HTTP/1 connectionsPosiblemente ocupada @akasakariko la tomó hace 2 días. AbiertoC-bug
Dificultad 4/5 1-2 días Aptitud para principiantes 55/100
hyperium/hyper#4246 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
can't upgrade request that came in with `Connection: close, Upgrade`Posiblemente ocupada @akasakariko la tomó hace 2 días. AbiertoC-bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
hyperium/hyper#4244 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
Todos los issues de hyperium/hyper
Issues similares
-
priority middle
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
KATO-Hiro/AtCoderClans#12940 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hurttlocker/o8#5112 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día