proper user agent for pycurl

This commit is contained in:
Simon 2018-09-29 11:38:52 -04:00
parent 0c423ee9a9
commit 2ef60a05a5

View File

@ -106,6 +106,7 @@ class HttpDirectory(RemoteDirectory):
self.curl.setopt(self.curl.SSL_VERIFYPEER, 0)
self.curl.setopt(self.curl.SSL_VERIFYHOST, 0)
self.curl.setopt(pycurl.TIMEOUT, HttpDirectory.TIMEOUT)
self.curl.setopt(pycurl.USERAGENT, config.HEADERS["User-Agent"])
self.curl_head = self._curl_handle()
@ -117,6 +118,7 @@ class HttpDirectory(RemoteDirectory):
curl_head.setopt(pycurl.SSL_VERIFYHOST, 0)
curl_head.setopt(pycurl.NOBODY, 1)
curl_head.setopt(pycurl.TIMEOUT, HttpDirectory.TIMEOUT)
curl_head.setopt(pycurl.USERAGENT, config.HEADERS["User-Agent"])
return curl_head