1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00
denoland-deno/op_crates/fetch
Rich Trott e568ddf996
fix(op_crates/fetch): correct regexp for fetch header (#8927)
Fix bug in regular expression and make the regular expression more
strict.

In a string passed to new RegExp(), '[\t\s]' is identical to '[ts]' and
not `/[\t\s]/`. For that, the backslash needs to be escaped in the
string. Futhermore, `\t` is the tab character and is included in the
special regexp value `\s` so is unnecessary.

That would reduce the RegExp to new RegExp(`^${value}\\s*;?`) but
there's no point in matching 0 or more space characters followed by 0 or
one semi-colons as that will match no matter what follows `value`.

To make it more strict, require one of space, semicolon, or
end-of-string after value.
2020-12-30 23:46:08 +01:00
..
01_fetch_util.js refactor: deno_fetch op crate (#7524) 2020-09-18 09:20:55 -04:00
03_dom_iterable.js refactor: deno_fetch op crate (#7524) 2020-09-18 09:20:55 -04:00
11_streams.js chore: fixed various misspellings and other typos (#8691) 2020-12-11 06:45:45 +11:00
20_headers.js chore: fixed various misspellings and other typos (#8691) 2020-12-11 06:45:45 +11:00
26_fetch.js fix(op_crates/fetch): correct regexp for fetch header (#8927) 2020-12-30 23:46:08 +01:00
Cargo.toml chore: release crates (#8931) 2020-12-30 15:29:17 +01:00
lib.deno_fetch.d.ts build: migrate to dlint (#8176) 2020-11-03 16:19:29 +01:00
lib.rs fix: fetch bad URL will not panic (#8884) 2020-12-26 08:06:00 -05:00
README.md publish deno_fetch during CI (#7557) 2020-09-18 12:31:30 -04:00

This crate provides the web standard fetch API to deno_core.