• <bdo id='NTCKG'></bdo><ul id='NTCKG'></ul>
    <tfoot id='NTCKG'></tfoot>

    <small id='NTCKG'></small><noframes id='NTCKG'>

      <legend id='NTCKG'><style id='NTCKG'><dir id='NTCKG'><q id='NTCKG'></q></dir></style></legend>
    1. <i id='NTCKG'><tr id='NTCKG'><dt id='NTCKG'><q id='NTCKG'><span id='NTCKG'><b id='NTCKG'><form id='NTCKG'><ins id='NTCKG'></ins><ul id='NTCKG'></ul><sub id='NTCKG'></sub></form><legend id='NTCKG'></legend><bdo id='NTCKG'><pre id='NTCKG'><center id='NTCKG'></center></pre></bdo></b><th id='NTCKG'></th></span></q></dt></tr></i><div id='NTCKG'><tfoot id='NTCKG'></tfoot><dl id='NTCKG'><fieldset id='NTCKG'></fieldset></dl></div>

        使用带有 TLS 的请求不会提供 SNI 支持

        using requests with TLS doesn#39;t give SNI support(使用带有 TLS 的请求不会提供 SNI 支持)
        <i id='6BhGh'><tr id='6BhGh'><dt id='6BhGh'><q id='6BhGh'><span id='6BhGh'><b id='6BhGh'><form id='6BhGh'><ins id='6BhGh'></ins><ul id='6BhGh'></ul><sub id='6BhGh'></sub></form><legend id='6BhGh'></legend><bdo id='6BhGh'><pre id='6BhGh'><center id='6BhGh'></center></pre></bdo></b><th id='6BhGh'></th></span></q></dt></tr></i><div id='6BhGh'><tfoot id='6BhGh'></tfoot><dl id='6BhGh'><fieldset id='6BhGh'></fieldset></dl></div>

          • <legend id='6BhGh'><style id='6BhGh'><dir id='6BhGh'><q id='6BhGh'></q></dir></style></legend>
              <bdo id='6BhGh'></bdo><ul id='6BhGh'></ul>
                  <tbody id='6BhGh'></tbody>
              1. <small id='6BhGh'></small><noframes id='6BhGh'>

                  <tfoot id='6BhGh'></tfoot>
                  本文介绍了使用带有 TLS 的请求不会提供 SNI 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用请求与 django 应用程序进行通信,但是

                  I'm using requests to communicate with a django app but

                  当我尝试时

                  requests.get('https://mysite.com', verify=True)
                  

                  我得到错误:

                  主机名mysite.com"与*.myhost.com"、myhost.com"中的任何一个都不匹配

                  hostname 'mysite.com' doesn't match either of '*.myhost.com', 'myhost.com'

                  但是,当我查看浏览器时,或 http://www.digicert.com/help/ 证书看起来不错,花花公子.

                  However, when I look at the browser, or http://www.digicert.com/help/ the certificate looks fine and dandy.

                  我的主人认为这是由于请求缺乏 SNI 支持(Github 似乎证实了 https://github.com/kennethreitz/requests/issues/749).有没有人找到使用请求的解决方法?

                  My host suggested it was the lack of SNI support from requests (and Github seems to confirm that https://github.com/kennethreitz/requests/issues/749 ). Has anyone found a work-around using requests?

                  推荐答案

                  当前版本的 Requests 应该可以使用 SNI.再往下看 GitHub issue 你可以看到要求:

                  The current version of Requests should be just fine with SNI. Further down the GitHub issue you can see the requirements:

                  • pyOpenSSL
                  • ndg-httpsclient
                  • pyasn1

                  尝试安装这些软件包,然后再试一次.

                  Try installing those packages and then give it another shot.

                  编辑:从 Requests v2.12.1 开始,不再需要 ndg-httpsclient 和 pyasn1.所需软件包的完整列表现在是:

                  EDIT: As of Requests v2.12.1, ndg-httpsclient and pyasn1 are no longer required. The full list of required packages is now:

                  • pyOpenSSL
                  • idna

                  这篇关于使用带有 TLS 的请求不会提供 SNI 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)

                    • <legend id='7GjLD'><style id='7GjLD'><dir id='7GjLD'><q id='7GjLD'></q></dir></style></legend>
                    • <small id='7GjLD'></small><noframes id='7GjLD'>

                        <tbody id='7GjLD'></tbody>
                    • <tfoot id='7GjLD'></tfoot>

                      <i id='7GjLD'><tr id='7GjLD'><dt id='7GjLD'><q id='7GjLD'><span id='7GjLD'><b id='7GjLD'><form id='7GjLD'><ins id='7GjLD'></ins><ul id='7GjLD'></ul><sub id='7GjLD'></sub></form><legend id='7GjLD'></legend><bdo id='7GjLD'><pre id='7GjLD'><center id='7GjLD'></center></pre></bdo></b><th id='7GjLD'></th></span></q></dt></tr></i><div id='7GjLD'><tfoot id='7GjLD'></tfoot><dl id='7GjLD'><fieldset id='7GjLD'></fieldset></dl></div>
                        • <bdo id='7GjLD'></bdo><ul id='7GjLD'></ul>