You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Add a streaming tail worker test that verifies the warning is emitted and
captured in the tracing system when a Request is constructed with a
FormData body and a custom Content-Type header.
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments