Closed nabetti1720 closed 1 month ago
I suggest to encode (or hardcode) gzip, deflate, br and zstd "hello world" bytes and read the response as plain texts. Ideally test in Rust and not JS so we can mock the http responses.
Yes, I added the test that way. One of the remaining ToDo, checking deflate decompression on the actual website, can be substituted for this test if it seems difficult.
The remaining issue is the default accept-encoding
and pre-allocating vectors.
Yes, I added the test that way. One of the remaining ToDo, checking deflate decompression on the actual website, can be substituted for this test if it seems difficult.
It's not ideal to have CI depend on external resources. These tests should suffice.
It's not ideal to have CI depend on external resources. These tests should suffice.
Sorry for the misunderstanding. We did not intend to incorporate access to external resources into the CI test, we just wanted to see how it worked on a real website. :)
@nabetti1720 please rebase from main. I have a minor changed CI
@nabetti1720 please rebase from main. I have a minor changed CI
I ran it as soon as possible.
Hi @richarddavison, sorry for the delay. All issues were addressed.
Issue #355 (if available)
Description of changes
Execution Sample
content-encoding.js:
zstd
br
gzip
deflate
gzip, deflate, br, zstd
ToDo
Response.text()
orresponse.json()
does not work well in Mock Server testing...)[ ] Verifydeflate
decompression on the actual website. (I would like to know if anyone has found it anywhere. :)accept-encoding
. (Is there a specification that cannot be overridden by aheader
method whenRequest::builder()
is executed? Also, what about the encoding priority order?)Checklist
tests/unit
and/or in Rust for my feature if neededmake fix
to format JS and apply Clippy auto fixesmake check
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.