2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00
Files
axios/lib/helpers
DeepView Autofix f2dc449547 fix(parseProtocol): fix regex to require colon in protocol separator (#10729)
The regex used `(:?\/\/|:)` where `:?` was intended to be a
non-capturing group `(?:` but instead made the colon an optional
literal character. This caused URLs without a colon separator like
`http//example.com` to incorrectly match and return `http` as the
protocol. Fix the regex to `:(?:\/\/)?` which requires the colon
and optionally matches `//`, correctly rejecting malformed URLs.

Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-04-25 18:27:58 +02:00
..
2022-06-18 11:19:27 +02:00
2016-06-01 13:16:16 -06:00

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