Repository navigation
Commit f96cef3
fix: combine repeated request headers instead of keeping the last (#7588)
* fix: combine repeated request headers instead of keeping the last
_decode_asgi_headers built a dict from the ASGI header pairs, so a repeated
field kept only its last value: router.headers.cookie lost every cookie but
the last, and client_ip came from the last x-forwarded-for field instead of
the first hop. Join repeated cookie fields with "; " and every other repeated
field with ", ", in order.
Refs #7521
* perf: decode ASGI headers with the default codec
---------
Co-authored-by: ybai08 <271969568+ybai08@users.noreply.github.com>
Co-authored-by: Farhan <www.mfarvirus@gmail.com>1 parent f8a3ee8 commit f96cef3
3 files changed
Lines changed: 51 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
2104 | 2108 | | |
2105 | 2109 | | |
2106 | 2110 | | |
2107 | 2111 | | |
2108 | 2112 | | |
2109 | 2113 | | |
2110 | | - | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
2111 | 2123 | | |
2112 | 2124 | | |
2113 | 2125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
4463 | 4463 | | |
4464 | 4464 | | |
4465 | 4465 | | |
4466 | | - | |
| 4466 | + | |
4467 | 4467 | | |
4468 | 4468 | | |
4469 | 4469 | | |
4470 | | - | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
| 4478 | + | |
| 4479 | + | |
4471 | 4480 | | |
4472 | 4481 | | |
4473 | 4482 | | |
4474 | 4483 | | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
4475 | 4509 | | |
4476 | 4510 | | |
4477 | 4511 | | |
| |||
0 commit comments