File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,6 +201,12 @@ void llhttp__test_init_response_lenient_header_value_relaxed(llparse_t* s) {
201201 s -> lenient_flags |= LENIENT_HEADER_VALUE_RELAXED ;
202202}
203203
204+ void llhttp__test_init_request_lenient_host_header_relaxed (llparse_t * s ) {
205+ llhttp__test_init_request (s );
206+ s -> lenient_flags |= LENIENT_HOST_HEADER ;
207+ }
208+
209+
204210
205211void llhttp__test_finish (llparse_t * s ) {
206212 llparse__print (NULL , NULL , "finish=%d" , s -> finish );
Original file line number Diff line number Diff line change 1+ Relaxed host header
2+ ===================
3+
4+ Relaxed host header mode: accepts multiple host headers
5+ this is meant to stop redirection or injection attacks
6+ and other unusual behaviors.
7+
8+ ## multiple host headers (relaxed)
9+ HOST_HEADER if set should allow multiple hosts to be set.
10+
11+ <!-- meta={"type": "request_lenient_host_header_relaxed"} -->
12+
13+ ``` http
14+ GET /url HTTP/1.1
15+ host: www.python.org
16+ host: llhttp.org
17+
18+ ```
19+
20+
21+ ## Multiple Host
22+
23+ HOST_HEADER if disabled should not allow multiple headers to be set.
24+
25+ ``` http
26+ GET /url HTTP/1.1
27+ host: www.python.org
28+ host: llhttp.org
29+
30+ ```
31+
You can’t perform that action at this time.
0 commit comments