Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Header content-encoding isn't automatically convert to lower case. #5890

@sfc-gh-pmotacki

Description

@sfc-gh-pmotacki

Describe the bug

Many services respond with header['content-encoding'] in many forms: 'Gzip', 'GZIP', 'GZip'. My example is connected with downloading from storage.googleapis.com. Response header content-encoding has value 'GZIP' and it is a reason why axios don't decompress content. In my opinion header value should be case-insensitive.

To Reproduce

Every request with zipped response with header['content-encoding'] written in non-lowercase letters.

Code snippet

No response

Expected behavior

No response

Axios Version

1.5.0

Adapter Version

http

Browser

chrome

Browser Version

No response

Node.js Version

18

OS

mac os

Additional Library Versions

No response

Additional context/Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions