Repository navigation
fix(fetch): json stringify string data when content-type has parameters - #43395
Conversation
| }); | ||
| } | ||
|
|
||
| it('should json stringify string body when content-type has parameters', { |
There was a problem hiding this comment.
Looks like your agent lost the AGENTS.md - we have a test for this: should json stringify ${type} body when content-type is application/json
There was a problem hiding this comment.
Thanks, folded it into the existing should json stringify ${type} body test: it now posts with both application/json and Application/JSON; charset=utf-8. The three string cases fail without the fix.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"Warning The triggering workflow run ended with status 655 passed, 169 skipped Merge workflow run. |
Test results for "tests 1"1 failed 5 flaky21794 passed, 525 skipped Merge workflow run. |
APIRequestContextJSON-serializes stringdatawhen the request's content type is JSON, but it compared theContent-Typeheader against exactlyapplication/json. A value with parameters, such as the commonapplication/json; charset=utf-8, or with different casing was not recognized, so the string was sent raw. The check now compares only the media type, case-insensitively.Supersedes #43391, which makes the same code change but adds three new tests.
Fixes: #43388
Closes: #43391