Skip to content

optional auto_decompress for HttpRequestParser #5957

Closed
@p4l1ly

Description

@p4l1ly

Is your feature request related to a problem?

auto_decompress can be disabled for client but unfortunately not for server.

Describe the solution you'd like

Export the API (I'm going to open a PR few minutes after filing this issue)

Describe alternatives you've considered

The feature can be hacked by setting AIOHTTP_NO_EXTENSIONS=true and

request_handler_init = web.RequestHandler.__init__

def disable_decompression(self, *args, **kwargs):
    request_handler_init(self, *args, **kwargs)
    self._request_parser._auto_decompress = False

web.RequestHandler.__init__ = disable_decompression

but that is ugly and slow.

Related component

Server

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      optional auto_decompress for HttpRequestParser · Issue #5957 · aio-libs/aiohttp