Casper Beyer
20692f3e84
chore: replace calls to assertThrowsAsync with assertRejects ( #12176 )
2021-09-22 09:21:11 -04:00
David Sherret
4c8ab33def
chore(tests): fix flaky fetchPostBodyTypedArray ( #12104 )
2021-09-17 09:02:44 -04:00
Nayeem Rahman
2cc1577d28
fix(ext/fetch): Properly cancel upload stream when aborting ( #11966 )
...
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-09-13 01:19:38 +02:00
Sean Michael Wykes
dccf4cbe36
feat(fetch): mTLS client certificates for fetch() ( #11721 )
...
This commit adds support for specifying client certificates when using fetch, by means of `Deno.createHttpClient`.
2021-08-25 14:25:12 +02:00
David Sherret
15a763152f
chore: move test files to testdata directory ( #11601 )
2021-08-11 10:20:47 -04:00
Leo K
3f0cf9619f
refactor(cli/tests): remove unnecessary void return types ( #11577 )
2021-08-05 13:08:58 +02:00
Bartek Iwańczuk
505d253436
Revert "fix(extensions/fetch): Add Origin header to outgoing requests for fetch ( #11557 )" ( #11565 )
...
This reverts commit f87aa44d94
.
2021-08-02 15:56:52 +02:00
Feng Yu
f87aa44d94
fix(extensions/fetch): Add Origin header to outgoing requests for fetch ( #11557 )
2021-08-02 02:19:21 -07:00
Luca Casonato
55632266e9
tests: re-enable disabled Response.formData test ( #11453 )
2021-07-20 00:11:50 +02:00
Jimmy Wärting
2c0b0e45b7
refactor: asynchronous blob backing store ( #10969 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-07-05 15:34:37 +02:00
Craig Morten
a6c840d150
fix(fetch): OPTIONS should be allowed a non-null body ( #11242 )
2021-07-05 12:38:12 +02:00
Luca Casonato
de6e44794b
fix: panic in request body streaming ( #11191 )
2021-06-30 18:05:58 +02:00
Vladimir Ivanov
cd59601b34
fix(extensions/fetch): Filter out custom HOST headers ( #11020 )
...
This commit updates "fetch" API to ignore custom "Host" headers
and return value provided by "reqwest".
2021-06-22 05:42:04 +02:00
Luca Casonato
d5d59bb794
fix(fetch): make prototype properties writable ( #10769 )
2021-05-26 23:44:42 +02:00
Anonymous
688557e226
fix(op_crates/fetch): check fetch() argument length ( #10474 )
2021-05-03 09:05:42 +02:00
William Perron
a50dab683f
fix(op_crate/fetch): infinite loop on fill headers ( #10406 )
...
Fixes a pesky bug in the fetch implementation where if the init part is
specified in `fetch` instead of the `Request` constructor, the
fillHeaders function receives two references to the same object, causing
it to append to the same list being iterated over.
2021-04-29 13:56:59 -04:00
Luca Casonato
9e6cd91014
chore: align fetch to spec ( #10203 )
...
This commit aligns the `fetch` API and the `Request` / `Response`
classes belonging to it to the spec. This commit enables all the
relevant `fetch` WPT tests. Spec compliance is now at around 90%.
Performance is essentially identical now (within 1% of 1.9.0).
2021-04-20 14:47:22 +02:00
Luca Casonato
0552eaf569
chore: align Headers
to spec ( #10199 )
...
This commit aligns `Headers` to spec. It also removes the now unused
03_dom_iterable.js file. We now pass all relevant `Headers` WPT. We do
not implement any sort of header filtering, as we are a server side
runtime.
This is likely not the most efficient implementation of `Headers` yet.
It is however spec compliant. Once all the APIs in the `HTTP` hot loop
are correct we can start optimizing them. It is likely that this commit
reduces bench throughput temporarily.
2021-04-19 01:00:13 +02:00
Bartek Iwańczuk
1c7217e390
chore: upgrade dependencies ( #10094 )
...
This commit upgrades:
- swc_ecmascript
- swc_bundler
- deno_doc
- deno_lint
- dprint-plugin-typescript
2021-04-09 23:35:29 +02:00
Luca Casonato
da60e2afcb
chore: deprecate Deno.Buffer and read/write utils ( #9793 )
...
This commit marks the `Deno.Buffer` / `Deno.readAll` /
`Deno.readAllSync` / `Deno.writeAll` / `Deno.writeAllSync` utils as
deprecated, and schedules them for removal in Deno 2.0. These
utilities are implemented in pure JS, so should not be part of the
Deno namespace.
These utilities are now available in std/io/buffer and std/io/util:
https://github.com/denoland/deno_std/pull/808 .
This additionallty removes all internal dependance on Deno.Buffer.
2021-04-06 00:05:36 +02:00
Aaron O'Mullan
7d12dd1899
fix: fallback to default UA and CA data for Deno.createHttpClient() ( #9830 )
2021-03-18 23:54:26 +01:00
David DeSimone
8be0c8b43a
fix(tests): fix fetchConnectionError test if port is in use ( #9465 )
...
Fixes #9379
2021-02-22 13:26:17 +01:00
Luca Casonato
6ecc86cf2a
chore: add jsdoc to 26_fetch.js and enable some fetch tests ( #9305 )
2021-01-28 21:37:21 +01:00
Kitson Kelly
b8303c7812
refactor(op_crate/fetch): align streams to spec ( #9103 )
...
Fixes #8814
2021-01-15 08:57:19 +11:00
Yusuke Tanaka
d8fd71afdf
chore: update copyright to 2021 ( #9092 )
2021-01-11 18:13:41 +01:00
Luca Casonato
1a6ce29f3d
feat(fetch): req streaming + 0-copy resp streaming ( #9036 )
...
* feat(fetch): req streaming + 0-copy resp streaming
* lint
* lint
* fix test
* rm test.js
* explicitly use CancelHandle::default()
* Apply review suggestions
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
* fix test
* Merge remote-tracking branch 'origin/master' into fetch_real_streaming
* fix test
* retrigger ci
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
2021-01-10 20:54:29 +01:00
Nayeem Rahman
e61e81eb57
feat: add --location=<href> and globalThis.location ( #7369 )
2021-01-07 19:06:08 +01:00
Mo
3e5a3daf59
BREAKING(unstable): remove CreateHttpClientOptions.caFile ( #8928 )
2021-01-04 16:55:20 +01:00
Bartek Iwańczuk
f4246ee1fc
chore: disable flaky test on Windows ( #8987 )
2021-01-04 14:27:29 +01:00
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
Rich Trott
af222f7a7f
chore(cli/tests): fix typo in test failure message ( #8935 )
2020-12-30 11:00:55 -05:00
Yosi Pramajaya
c1fdb30394
fix: fetch bad URL will not panic ( #8884 )
2020-12-26 08:06:00 -05:00
Luca Casonato
ddda669a02
fix: implement ReadableStream fetch body handling ( #8855 )
2020-12-22 14:14:23 +01:00
yonatan ben avraham
afbd19ed9b
feat(unstable): support in memory certificate data for Deno.createHttpClient ( #8739 )
2020-12-19 23:13:48 +01:00
Jae-Heon Ji
d492fb0eac
fix(op_crates/fetch): support non-ascii response headers value ( #8600 )
2020-12-09 16:48:06 +01:00
Luca Casonato
501a31fcf3
fix(op_crates/fetch): redirect: "manual"
fetch should return type: "default"
response ( #8353 )
2020-11-24 21:00:35 +01:00
Bartek Iwańczuk
8e914be742
build: migrate to dlint ( #8176 )
...
This commit migrates repository from using "eslint"
to "dlint" for linting JavaScript code.
2020-11-03 16:19:29 +01:00
Luca Casonato
08441b855d
fix(op_crates/fetch): Body.body should be stream of Uint8Array ( #8030 )
2020-10-19 17:01:36 +02:00
David Sherret
df02e31507
feat(fmt): Sort named import and export specifiers ( #7711 )
2020-09-27 12:22:32 +02:00
Casper Beyer
1d0f1ed446
fix: Empty Response body returns 0-byte array ( #7387 )
2020-09-08 11:46:15 +02:00
Luca Casonato
ce7808baf0
feat(cli): custom http client for fetch ( #6918 )
2020-08-05 20:44:03 +02:00
David Sherret
cde4dbb351
Use dprint for internal formatting ( #6682 )
2020-07-14 15:24:17 -04:00
Marcos Casagrande
4aeac64ecd
fix(cli/fetch): fix relative redirect ( #6715 )
2020-07-13 00:53:36 -04:00
Marcos Casagrande
e4899b6ba4
perf(cli/body): improve .arrayBuffer() speed ( #6669 )
2020-07-07 22:25:34 -04:00
Marcos Casagrande
3b4260dc54
fix(cli/fetch): response constructor default properties ( #6650 )
2020-07-05 21:37:18 -04:00
Ryan Dahl
5f9e600c5b
chore: port http_server.py to rust ( #6364 )
2020-07-04 13:05:01 -04:00
Casper Beyer
87f8f99c49
refactor(cli/tests/unit) to use assertThrows ( #6459 )
2020-06-25 00:57:08 +02:00
Alan Gou
ffedbd79ad
build: lint cli/tests/unit using deno lint ( #6327 )
2020-06-19 11:05:37 +02:00
Marcos Casagrande
d907133944
fix(cli/web/fetch): multipart/form-data request body support for binary files ( #5886 )
2020-06-08 18:08:26 +02:00
Casper Beyer
ed5aedc6b4
Rename abbreviated assertions in std/testing ( #6118 )
2020-06-05 23:43:00 -04:00