Commit 0d3809c
committed
fix: throw error when Content-Type is invalid
when you call res.set('Content-Type', value) with something thats not a
real MIME type, mime.contentType() returns false and that false was getting
coerced to the string "false" and set as the header. now it throws a
TypeError instead.
fixes #70341 parent 9c85a25 commit 0d3809c
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
677 | 681 | | |
678 | 682 | | |
679 | 683 | | |
| |||
0 commit comments