Request::connect can build an invalid Request object
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- networking
Direzione di ricerca
Inizia leggendo la documentazione di Request::connect e Uri::authority, quindi segui la chiamata a body() mostrata nell'esempio. Determina quale comportamento di RFC 2817 è previsto e verifica che la costruzione di una richiesta CONNECT non possa preservare un URI completo non valido.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
According to RFC2817, Section 5.2 the URI of the CONNECT method should be only the authority part:
A CONNECT method requests that a proxy establish a tunnel connection
on its behalf. The Request-URI portion of the Request-Line is always
an 'authority' as defined by URI Generic Syntax [2], which is to say
the host name and port number destination of the requested connection
separated by a colon:
However with the http 0.2.4 crate it is possible to create a CONNECT request with an invalid URI part.
Example:
use http::Request;
use http::Uri;
fn main() {
let u: Uri = "http://example.org/index.html".parse().unwrap();
let r = Request::connect(u).body(()).unwrap();
dbg!(&r);
}
Output:
[src/main.rs:7] &r = Request {
method: CONNECT,
uri: http://example.org/index.html,
version: HTTP/1.1,
headers: {},
body: (),
}
Available options are:
- Keep it as is.
- When building a
CONNECTrequest, take only the authority part of the URI and ensure it has the correct value for the destination port. - Return a
Uri(uri::InvalidUri)error when callingbody().
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 378
- Merge medio
- 1g 21h
- PR unite (30g)
- 5
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperium/http
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
Tutte le issue di hyperium/http
Issue simili
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Apertabug CLI custom-model
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100