Open OJFord opened 1 month ago
Ah do we perhaps just need binary_support=False
? This is with ALB, so I gather the implicit None
there is enabling it.
I believe this was fixed in #80 , back in version 2.3.0 (2019-08-19).
~You’re not using version 2.18.0 as you report because the source in your traceback does not match. Please check which version you are actually using.~
Ah, no, sorry the source does match.
I think binary_support=True
may fix it, but ideally we would send binary automatically. This method should be returning True
, but isn’t:
That could be a problem with my headers rather than that detection though I suppose.
I will try it shortly, thanks for getting back to me so quickly.
It's because of the first
if not self.binary_support:
return False
isn't it? I'm not setting it, and so: https://github.com/adamchainz/apig-wsgi/blob/dc220949c4bf9b0aeb0eb49fdd4767af66fdb776/src/apig_wsgi/__init__.py#L74-L76
(which seems contrary to the readme, hence I got it the wrong way around in my first reply: https://github.com/adamchainz/apig-wsgi/blob/dc220949c4bf9b0aeb0eb49fdd4767af66fdb776/README.rst?plain=1#L81?)
I think
binary_support=True
may fix it
and I can confirm it does indeed! Thanks again.
As above though I think the intention was for version == "alb"
to do binary_support != False
rather than or False
, i.e. to default it True
when None
, so it wouldn't have been necessary for me to set it explicitly.
Python Version
3.11
Package Version
2.18.0
Description
Called like:
with
"django.middleware.gzip.GZipMiddleware",
in middleware.