Mercurial > hg > documentViewer
comparison SrvTxtUtils.py @ 622:bc68ca0d2c0a
make annotationServerUrl work with protocol-relative URL (//).
author | casties |
---|---|
date | Fri, 12 Dec 2014 16:27:58 +0100 |
parents | a7b287122ce8 |
children | 6012fe93f78c |
comparison
equal
deleted
inserted
replaced
621:a7b287122ce8 | 622:bc68ca0d2c0a |
---|---|
278 if httplib == 'httplib2': | 278 if httplib == 'httplib2': |
279 # use httplib2 | 279 # use httplib2 |
280 for cnt in range(num_tries): | 280 for cnt in range(num_tries): |
281 try: | 281 try: |
282 logging.debug("getHttp(lib2)Data(#%s %ss) url=%s"%(cnt+1,timeout,url)) | 282 logging.debug("getHttp(lib2)Data(#%s %ss) url=%s"%(cnt+1,timeout,url)) |
283 # I would prefer at least disable_ssl_certificate_validation=insecure | |
284 # but python < 2.7.9 doesn't do SNI :-( | |
283 h = httplib2.Http(cache=cache, timeout=float(timeout), disable_ssl_certificate_validation=True) | 285 h = httplib2.Http(cache=cache, timeout=float(timeout), disable_ssl_certificate_validation=True) |
284 if username: | 286 if username: |
285 h.add_credentials(username, password) | 287 h.add_credentials(username, password) |
286 | 288 |
287 resp, data = h.request(url) | 289 resp, data = h.request(url) |