Skip to content

Accept.encodings *;q=0 issue #75

Description

@hoolam

Runtime

node.js

Runtime version

v20.18.0

Module version

@hapi/accept 6.0.3

Last module version without issue

No response

Used with

Standalone

Any other relevant information

No response

What are you trying to achieve or the steps to reproduce?

I am expecting the following code to produce [ 'compress' ] but instead it produces [ 'compress', 'identity' ], since I expect "*;q=0" to exclude "identity". Is my understanding correct?

const accept = require( "@hapi/accept" );
console.log( accept.encodings( "compress;q=0.5, *;q=0" ));

What was the result you got?

[ 'compress', 'identity' ]

What result did you expect?

[ 'compress' ]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug or defect

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions