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

optional auto_decompress for HttpRequestParser #5957

Closed
1 task done
p4l1ly opened this issue Aug 19, 2021 · 0 comments · Fixed by #5958
Closed
1 task done

optional auto_decompress for HttpRequestParser #5957

p4l1ly opened this issue Aug 19, 2021 · 0 comments · Fixed by #5958

Comments

@p4l1ly
Copy link
Contributor

p4l1ly commented Aug 19, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant