if "Expect" not in request.headers:
request.headers["Expect"] = ""
+ # libcurl adds Pragma: no-cache by default; disable that too
+ if "Pragma" not in request.headers:
+ request.headers["Pragma"] = ""
+
# Request headers may be either a regular dict or HTTPHeaders object
if isinstance(request.headers, httputil.HTTPHeaders):
curl.setopt(pycurl.HTTPHEADER,
timestamp = calendar.timegm(if_modified_since.utctimetuple())
headers["If-Modified-Since"] = email.utils.formatdate(
timestamp, localtime=False, usegmt=True)
- if "Pragma" not in headers:
- headers["Pragma"] = ""
# Proxy support: proxy_host and proxy_port must be set to connect via
# proxy. The username and password credentials are optional.
self.proxy_host = proxy_host