Commit Detail
Commit c3789ee
fix: revive dead FormData Content-Type warning (#6067) The logWarning() in Body::Body that warns when a FormData body is paired with a custom Content-Type header was dead code. The comparison used ConstMimeType::operator==(kj::StringPtr), which compared the full substring after '/' against the subtype -- so 'form-data; boundary=...' never matched 'form-data'. Fix the comparison by parsing the content-type string into a MimeType first, then comparing against MimeType::FORM_DATA. The MimeType equality operator correctly ignores MIME parameters like boundary. Also remove ConstMimeType::operator==(kj::StringPtr) entirely -- it was a footgun with only this one (buggy) caller, and any future use would hit the same parameter-ignoring trap. Co-Authored-By: Claude <noreply@anthropic.com>
Files changed
2 files changed~2 modified