-
Notifications
You must be signed in to change notification settings - Fork 791
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
[http_fuzz] Accept-Encoding header will result in content not being decoded #88
Comments
Are you saying you would like Patator to gzip-decode the HTTP response when you are specifically passing |
I am just saying that the intended behavior is not what's happening in this case. |
Patator uses Also even if Patator used import pycurl
from StringIO import StringIO
buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.HTTPHEADER, [('Accept-Encoding: gzip'),])
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()
body = buffer.getvalue()
print('%r' % body) |
Also, I'm not too sure about stripping the header on behalf of the user. It may confuse him/her too if for example they are surprised not to receive a encoded response. I tend to prefer letting the user understand what they are actually doing instead of doing it for them. |
Here is a PR that should fix this issue. Maybe I should add a warning in case the |
How to reproduce:
Then, the content of the response (not the headers) is not uncompressed.
This behavior is due to the use of the
DEBUGFUNCTION
callback rather than theWRITEDATA
orWRITEFUNCTION
that are not affected by this issue.I don't actually know if this behavior is intended for the pycurl library...
The text was updated successfully, but these errors were encountered: