chore(release): prepare v0.14.0#62
Conversation
|
Warning Review limit reached
More reviews will be available in 17 minutes and 53 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Changed
multipartkit/infer.content_type_from_filenameandcontent_type_from_bytesare no longer no-ops: they now resolve well-known extensions and magic-byte signatures by delegating tonao1215/mimetype, returningSome(mime)for recognised input ("a.png"->Some("image/png"), a PNG header ->Some("image/png")) andNoneotherwise.nao1215/mimetypeis added as a runtime dependency. A newinfer.builtin_inferer()wires these helpers into anInferersoform.add_file_auto_with(form, ..., infer.builtin_inferer())gets built-in inference;infer.default_inferer()is intentionally kept a no-op soadd_file_autostill falls through toapplication/octet-streamand never changes a content type implicitly. This reverses the v0.13.0 (infer.content_type_from_filename/from_bytes are no-op defaults — silently return None for known types #52) decision to ship these helpers as documented no-ops. (REGRESSION: infer.content_type_from_filename / from_bytes still return None for known PNG / JSON / PDF / GIF (closes #52 not effective) #59)Fixed
multipartkit/form.add_fieldno longer lets an empty (or stripped-to-empty / whitespace-only)namereach the wire asContent-Disposition: form-data; name="". The lenient builder now renames such a part to a generated"_unnamed_<n>"placeholder (where<n>is the part's zero-based position), so the observablenameis neverSome("")and the part stays RFC 7578-addressable. The placeholder is position-based, not collision-proof against a caller who also supplies a literal"_unnamed_<k>". Callers that want bad names surfaced as a typed error rather than renamed should useadd_field_strict. (REGRESSION: form.add_field still silently strips CR/LF from field name (closes #40 not effective) #57, REGRESSION: form.add_field still silently accepts empty name → Some('') (closes #51 incomplete) #58)