actix / actix/actix-web

Remove Option from RequestHeadType::Rc

Abierto
#2,477 2 comentarios 0 reacciones 1 asignado Reclamado por @robjtede Ver en GitHub
A-awc A-http C-improvement
Lenguaje dominante
Rust
Estrellas
24.8k
Forks
1.9k
Merge medio
23 h 10 min
PR fusionados (30 d)
26

Descripción

When working with middlewares, I needed to destructure into the ConnectRequest and RequestHeadType to add new headers into the request. If `RequestHeadType::Rc` defaulted to having an empty headermap instead of an Option it would be possible to implement a `headers_mut()` method on ConnectRequest for easy header additions.

I realize that providing a `headers_mut()` for the `RequestHeadType::Rc` case might be misleading, since it won't be possible to remove existing headers, but maybe with a bit of documentation that could be fine

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.