Repository navigation
docs(contenttypeparser): new strict content-type validation - #6925
Conversation
|
I will look at this. But it's going to be a couple of days before I can. |
Don't yet, need to fix up. (Doing that now) |
Please ping when ready. |
|
I ended up with unexpected travel last week. Will incorporate all open feedback in my open PRs this week. |
|
Looking at these again, sorry for the delay. |
20d14e3 to
1776bf4
Compare
|
@jsumners ok! fixed up let me know what you think. Sorry for the delay. |
jsumners
left a comment
There was a problem hiding this comment.
Looks good, but I prefer "rewrite" to "repair." Repair has a different connotation to me.
|
Fixed up! Thank you for the review suggestion blocks. |
|
Oh crap what did I do need to revert that last thing. |
5d2204b to
e346e95
Compare
|
Fixed. |
Should fastify actually guard for this? (If mediaType is accessed before rewriting the header in onRequest). |
🤷♂️ Seems like an edge case. But if you feel strongly about it, go for it. |
Happy to revisit if its an issue people run into. Thank you for the review! |
Signed-off-by: Bret Comnes <bret@comnes.org>
Signed-off-by: Bret Comnes <bret@comnes.org>
Signed-off-by: Bret Comnes <bret@comnes.org>
Co-authored-by: James Sumners <321201+jsumners@users.noreply.github.com> Signed-off-by: Bret Comnes <166301+bcomnes@users.noreply.github.com>
Co-authored-by: James Sumners <321201+jsumners@users.noreply.github.com> Signed-off-by: Bret Comnes <166301+bcomnes@users.noreply.github.com>
e346e95 to
6bc6f67
Compare
Document the request lifecycle boundary introduced by #6414:
Content-Typevalues are rejected before body parser selectiononRequesthook can narrowly canonicalize known external inputrequest.mediaTypeis accessed and cachedschema.body.contentguaranteesThe example intentionally handles one exact malformed value and leaves every unrelated value under Fastify strict validation.
Checklist
npm run test && npm run benchmark --if-presentand the Code of conduct