mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
5061879649
* fix: update fromDataURI regex to match RFC 2397 Update the DATA_URL_PATTERN regex to correctly match all valid RFC 2397 data URIs. The previous regex required a semicolon-terminated media type segment, which rejected valid data URIs like `data:;base64,MTIz` and `data:application/octet-stream,123`. Fixes #10808 * fix: normalize omitted mediatype to text/plain per RFC 2397 When a data URI has parameters but no mediatype (e.g. data:;charset=UTF-8,...), prepend text/plain as the default per RFC 2397 section 3. * fix: use stricter RFC 2397 regex and expand test matrix - Switch to type/subtype-aware regex from #10808 - Require name=value parameters, separate ;base64 group - Add tests: charset param, URL-encoded body, Blob type preservation, datax: rejection, missing comma rejection - Normalize omitted mediatype to text/plain per RFC 2397 §3 * chore: apply small nits --------- Co-authored-by: Abhishek Chauhan <abhishek-chauhan@outlook.com> Co-authored-by: Jay <jasonsaayman@gmail.com>
axios // helpers
The modules found in helpers/ should be generic modules that are not specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like:
- Browser polyfills
- Managing cookies
- Parsing HTTP headers