Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for brotli ('br') content-encoding #406

Open
wants to merge 4 commits into
base: master
from

Conversation

danielgindi added 2 commits Jul 10, 2020
@danielgindi
Copy link
Author

@danielgindi danielgindi commented Jul 19, 2020

How are we doing?

@UlisesGascon UlisesGascon requested a review from dougwilson Aug 4, 2020
Copy link
Member

@UlisesGascon UlisesGascon left a comment

LGTM @danielgindi!

Thanks fo the links attached to the PR. I will love to be able to try that compression in my next project 💪

@danielgindi
Copy link
Author

@danielgindi danielgindi commented Aug 4, 2020

LGTM @danielgindi!

Thanks fo the links attached to the PR. I will love to be able to try that compression in my next project 💪

Yeah this brotli is truly amazing :)

Btw we have a PR in the compression repo, to allow responses to be encoded too. It's two sides of the same coin

Copy link
Member

@dougwilson dougwilson left a comment

I moved over one comment that was still outstanding from the first repo and a general comment to make sure our detection makes sense from the noode.js project.

@@ -16,6 +16,8 @@ before trusting. For example, `req.body.foo.toString()` may fail in multiple
ways, for example the `foo` property may not be there or may not be a string,
and `toString` may not be a function and instead a string or other user input.

**Note** Brotli is supported only since Node.js versions v11.7.0 and v10.16.0.

This comment has been minimized.

@dougwilson

dougwilson Aug 4, 2020
Member

I would think that the information about version support should be along with the br support docs, otherwise users may not see it.

This comment has been minimized.

@danielgindi

danielgindi Aug 7, 2020
Author

I think you might be confusing the compression repo. In this one there's no br support section. As there's nothing to configure, it's just decoding.

This comment has been minimized.

@danielgindi

danielgindi Aug 8, 2020
Author

Still, where in the README do you want this? There's no explicit section for br...

lib/read.js Outdated
* @const
* whether current node version has brotli support
*/
var hasBrotliSupport = 'brotli' in process.versions

This comment has been minimized.

@dougwilson

dougwilson Aug 4, 2020
Member

This check feels a bit disconnected from the actual usage, and Node.js does not really explain the expectations around this structure. I went ahead and asked what Node.js thought we should do at nodejs/help#2897

This comment has been minimized.

@danielgindi

danielgindi Aug 5, 2020
Author

Seems like they don't have an answer yet 😂

Btw you know that you can commit changes to a branch of a PR?

This comment has been minimized.

@dougwilson

dougwilson Aug 7, 2020
Member

Looks like there is a question on there @danielgindi . Can you answer their question there? Also, what changes do you want me to make? I'd be happy to make them.

This comment has been minimized.

@danielgindi

danielgindi Aug 8, 2020
Author

It's a question for you actually. It's about semantics. What exactly do you feel is right to detect there? I don't have a strong feeling towards either way.
And - any changes you feel are right :-)

lib/read.js Outdated Show resolved Hide resolved
@danielgindi
Copy link
Author

@danielgindi danielgindi commented Aug 8, 2020

@dougwilson Have you noticed that we suddenly have a "leak" in the older node versions in CI?
These happens without any apparent reason, and the change in the code was insignificant, only DRYed a throw statement.
That's why I disabled that notification to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.