• <small id='61YQI'></small><noframes id='61YQI'>

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

        为什么我的 XHR 的 statusText 是空的?

        时间:2023-10-14
          <bdo id='Jog2j'></bdo><ul id='Jog2j'></ul>
            <tbody id='Jog2j'></tbody>

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

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

                  本文介绍了为什么我的 XHR 的 statusText 是空的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  当我在我们的生产系统上执行 XHR 时,响应中的 statusText 将是一个空字符串.但是,在我们的开发系统中,statusText 会正确反映状态.

                  When I perform an XHR on our production system, the statusText in the response will be an empty string. However, on our development system, the statusText will reflect the status correctly.

                  根据 XMLHttpRequest.statusText<的文档/code>,它只能在处理请求时为空.但是,我在 onload 处理程序中看到了这种行为.

                  According to the documentation for XMLHttpRequest.statusText, it should only be empty while the request is being processed. However, I am seeing this behavior in the onload handler.

                  此外,这种行为只能在 Chrome 和 Edge 中观察到.Firefox 将显示正确的文本.

                  Additionally, this behavior can only be observed in Chrome and Edge. Firefox will display the correct text.

                  那么,statusText的内容究竟是如何确定的呢?

                  So, how is the content of the statusText actually determined?

                  推荐答案

                  可能是因为一台服务器使用 HTTP/2,而另一台没有.HTTP/2 不再有原因短语.

                  It might be because one server uses HTTP/2, while the other does not. HTTP/2 doesn't have reason phrases anymore.

                  这篇关于为什么我的 XHR 的 statusText 是空的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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