Google app engine 请求特定URL时,应用程序引擎中出现下载错误

Google app engine 请求特定URL时,应用程序引擎中出现下载错误,google-app-engine,urlfetch,google-app-engine-python,Google App Engine,Urlfetch,Google App Engine Python,我在尝试使用urlfetch.fetch请求特定url时遇到奇怪的下载错误 下面是示例代码: url = 'https://iiko.net:9900/api/0/auth/access_token' try: result = urlfetch.fetch(url, deadline=50, validate_certificate=False) if result.status_code == 200: pass except DownloadError a

我在尝试使用urlfetch.fetch请求特定url时遇到奇怪的下载错误

下面是示例代码:

url = 'https://iiko.net:9900/api/0/auth/access_token'
try:
    result = urlfetch.fetch(url, deadline=50, validate_certificate=False)
    if result.status_code == 200:
        pass
 except DownloadError as er:
    logging.exception(er)
下面是错误:

Unable to fetch URL: https://iiko.net:9900/api/0/auth/access_token
Traceback (most recent call last):
  File "/base/data/home/apps/s~iappintheair/phil-dev.383038517236330514/handlers/api/test.py", line 18, in get
    result = urlfetch.fetch(url, deadline=50, validate_certificate=False)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/urlfetch.py", line 271, in fetch
    return rpc.get_result()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result
    return self.__get_result_hook(self)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/urlfetch.py", line 414, in _get_fetch_result
    raise DownloadError("Unable to fetch URL: " + url + error_detail)
DownloadError: Unable to fetch URL: https://iiko.net:9900/api/0/auth/access_token
我确信这与最后期限无关,因为这段代码在几秒钟内就失败了

可能它与此网站上损坏的ssl证书有关,或者GAE ip地址因某种原因被此网站阻止,但我现在无法与他们联系


感谢您的帮助,谢谢

此问题的原因是SSL证书损坏,现在一切正常。
作为我们使用代理服务器的一个解决方案,我知道这不是一个完美的解决方案,但我不知道如何在应用程序引擎级别修复它。

是的,它看起来确实连接到iiko.net损坏的SSL/TLS配置——即使尝试使用浏览器也会发出可怕的警告…:-(
validate_certificate
arg似乎没有什么作用。根据,围绕这一点存在许多未决问题——您可以启动一个或多个,尽管它“现在”对您没有帮助”…处理损坏的HTTPS服务器是一件非常痛苦的事情-(