Commit 9c79827
gh-130110: allow hyphens in RFC 2231 continuation parameter names
decode_params() matches RFC 2231 continuation parameter names with the
regex r'^(?P<name>\w+)\*...'. That rejects names containing a hyphen
(e.g. `file-name*0*`), leaving such continuations undecoded.
Widen the name class to [\w-] so hyphenated names are recognized, while
still restricting to RFC 2045 `token` characters: under re.ASCII, \w is
[A-Za-z0-9_], all of which are valid token chars, so no invalid
character can match.
Co-Authored-By: Hermes Agent <noreply@nousresearch.com>1 parent d714d68 commit 9c79827
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
404 | 410 | | |
405 | 411 | | |
406 | 412 | | |
| |||
0 commit comments