Skip to content

Error for requests with gzip content encoding and json content type #31

Closed
@oleg-babintsev

Description

@oleg-babintsev

Request headers:

headers = {
    'content-type': 'application/json',
    'charset': 'utf-8',
    'content-encoding': 'gzip',
}

Output in console:

SyntaxError: Unexpected token ▼ in JSON at position 0
    at JSON.parse (<anonymous>)
    at /app/index.js:48:22
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:137:13)
    at next (/app/node_modules/express/lib/router/route.js:131:14)
    at next (/app/node_modules/express/lib/router/route.js:131:14)
    at next (/app/node_modules/express/lib/router/route.js:131:14)
    at next (/app/node_modules/express/lib/router/route.js:131:14)
    at next (/app/node_modules/express/lib/router/route.js:131:14)
    at next (/app/node_modules/express/lib/router/route.js:131:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions