--
You received this message because you are subscribed to a topic in the Google Groups "Tornado Web Server" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-tornado/3TbO6mR0qiQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It sounds like you’re using curl_httpclient, since simple_httpclient doesn’t set as many headers automatically. In curl_httpclient, you can turn off any of the automatic headers by setting them to an empty string: headers={'User-Agent': '', 'Accept': '', 'Accept-Encoding': '', 'Host': ''}.
In simple_httpclient you can turn off the Accept-Encoding header by passing decompress_response=False. The other headers that are set automatically (Host and Connection) are necessary for the operation of the protocol so we do not let you send a request without them (you can set Host to a different value, but you can’t turn it off).
Also consider the pattern used in some of Tornado’s own tests, in which we construct a request by hand and then use HTTP1Connection to read the response. This may be better for you if you need to generate invalid HTTP messages:
https://github.com/tornadoweb/tornado/blob/fff09e9028bed0cf1d3f3e711ff4e15d4a2440a2/tornado/test/httpserver_test.py#L213
-Ben
--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Tornado Web Server" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-tornado/3TbO6mR0qiQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-tornad...@googlegroups.com.
Is there any way or hack that I can use raw_fetch in the curl or simple httpclient?Hello Ben,Thank you for your reply! This is exactly what I was looking for!