mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 09:21:42 +03:00
multipart: more lenient content-type parsing
It's not uncommon for files to have mime types like `image/svg+xml`. The + in there was tripping up the strictly-`@ta` parser for the content-type. Here we change the parser to accept +, and all the other characters that the `@t` parser accepts. This is perhaps a bit overkill, but we primarily care about getting the parsed request to the caller. If any further validation is required, it can happen upstream. Fixes #5282.
This commit is contained in:
parent
841df9cfe4
commit
51f4c83352
@ -37,7 +37,7 @@
|
||||
++ cut (jest 'Content-Type: ')
|
||||
++ dim (jest (cat 3 '--' del))
|
||||
++ nip (jest '\0d\0a')
|
||||
++ nab (more fas urs:ab)
|
||||
++ nab (more fas (cook (cury rap 3) (plus qit)))
|
||||
++ nag (dine ;~(less ;~(plug nip dim) next))
|
||||
++ nod (dine ;~(less doq next))
|
||||
++ nom (dine alp)
|
||||
|
Loading…
Reference in New Issue
Block a user