久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <tfoot id='JN57I'></tfoot>

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

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

        <bdo id='JN57I'></bdo><ul id='JN57I'></ul>

      XmlHttpRequest 狀態(tài) 0 而不是 IE 10 中的 401

      XmlHttpRequest status 0 instead of 401 in IE 10(XmlHttpRequest 狀態(tài) 0 而不是 IE 10 中的 401)

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

          <i id='zzRJs'><tr id='zzRJs'><dt id='zzRJs'><q id='zzRJs'><span id='zzRJs'><b id='zzRJs'><form id='zzRJs'><ins id='zzRJs'></ins><ul id='zzRJs'></ul><sub id='zzRJs'></sub></form><legend id='zzRJs'></legend><bdo id='zzRJs'><pre id='zzRJs'><center id='zzRJs'></center></pre></bdo></b><th id='zzRJs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zzRJs'><tfoot id='zzRJs'></tfoot><dl id='zzRJs'><fieldset id='zzRJs'></fieldset></dl></div>

              • <bdo id='zzRJs'></bdo><ul id='zzRJs'></ul>
                  <tbody id='zzRJs'></tbody>

                <tfoot id='zzRJs'></tfoot>
                本文介紹了XmlHttpRequest 狀態(tài) 0 而不是 IE 10 中的 401的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我遇到了這個問題.我想這是某種 IE 錯誤,但我想確定一下.

                所以問題是.為什么 IE10 XmlHttpRequest.status 返回 0 而不是 401?

                var xmlhttp=new XMLHttpRequest();xmlhttp.onreadystatechange=函數(shù)(){如果(xmlhttp.readyState==4){document.getElementById("rescode").innerHTML="請求完成,狀態(tài)為:"+xmlhttp.status;}}xmlhttp.open("GET","http://hosting.gregy.cz/cors/",true);xmlhttp.send();

                在這里查看插件:http://plnkr.co/edit/E2lCflPDHHaQi7t79IeM?p=previewp>

                此代碼觸發(fā) CORS 請求,該請求始終返回 401.Firefox 和 chrome 在狀態(tài)屬性中正確返回 401,但 IE10 返回 0.此問題破壞了我用于項目的身份驗證處理方法.

                謝謝

                我已經(jīng)用 onload 和 onerror 事件處理程序修改了 plunker(來自 monsur 評論的提示),但結(jié)果仍然相同.

                我還確定 IE10 沒有選擇兼容模式.(來自 cernunnos 評論的提示)

                解決方案

                這似乎是 IE10 中的一個錯誤 (https://connect.microsoft.com/IE/feedback/details/785990/ie-10-on-win8-does-not-assign-the-correct-status-to-xmlhttprequest-when-the-result-is-401).

                IE10 將 HTTP 狀態(tài) 401 視為網(wǎng)絡(luò)錯誤.控制臺顯示:

                SCRIPT7002:XMLHttpRequest:網(wǎng)絡(luò)錯誤 0x80070005,訪問被拒絕

                根據(jù) XMLHttpRequest Level 2 規(guī)范,如果設(shè)置了錯誤標志(例如由于網(wǎng)絡(luò)錯誤),狀態(tài)屬性應(yīng)該為零.然而,該規(guī)范還聲明(http://www.w3.org/TR/XMLHttpRequest2/#infrastructure-for-the-send-method) 網(wǎng)絡(luò)錯誤

                <塊引用>

                不包括指示某種類型錯誤的 HTTP 響應(yīng),例如作為 HTTP 狀態(tài)碼 410.

                我認為很明顯 HTTP 狀態(tài) 401 不應(yīng)因此被視為網(wǎng)絡(luò)錯誤(因為它不在 Chrome、Firefox 和 Safari 中)并且這是 IE10 中的錯誤.

                I have hit a wall with this issue. I guess it is some kind of IE bug but I want to be sure.

                So the question is. Why does IE10 XmlHttpRequest.status returns 0 instead of 401?

                var xmlhttp=new XMLHttpRequest();
                
                xmlhttp.onreadystatechange=function()
                  {
                  if (xmlhttp.readyState==4)
                    {
                      document.getElementById("rescode").innerHTML="Request completed with status: "+xmlhttp.status;
                    }
                  }
                xmlhttp.open("GET","http://hosting.gregy.cz/cors/",true);
                xmlhttp.send();
                

                See plunker here: http://plnkr.co/edit/E2lCflPDHHaQi7t79IeM?p=preview

                This code fires a CORS request which always returns 401. Firefox and chrome correctly return 401 in status attribute but IE10 returns 0. This issue breaks authentication handling methods I use for my project.

                Thank you

                Edit:

                I have modified the plunker with onload and onerror event handlers (tip from monsur's comment), but the result is still the same.

                I have also made sure IE10 has no compatibility mode selected. (tip from cernunnos's comment)

                解決方案

                This appears to be a bug in IE10 (https://connect.microsoft.com/IE/feedback/details/785990/ie-10-on-win8-does-not-assign-the-correct-status-to-xmlhttprequest-when-the-result-is-401).

                IE10 is treating HTTP status 401 as a network error. The console shows:

                SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied
                

                According to the XMLHttpRequest Level 2 specification the status attribute should be zero if the error flag is set (for example because of a network error). However the specification also states (http://www.w3.org/TR/XMLHttpRequest2/#infrastructure-for-the-send-method) that a network error

                does not include HTTP responses that indicate some type of error, such as HTTP status code 410.

                I think it is clear that HTTP status 401 should not therefore be treated as a network error (as it is not in Chrome, Firefox and Safari) and that this is a bug in IE10.

                這篇關(guān)于XmlHttpRequest 狀態(tài) 0 而不是 IE 10 中的 401的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調(diào)用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                • <bdo id='oXjgf'></bdo><ul id='oXjgf'></ul>
                    <legend id='oXjgf'><style id='oXjgf'><dir id='oXjgf'><q id='oXjgf'></q></dir></style></legend>
                      <tbody id='oXjgf'></tbody>

                      <tfoot id='oXjgf'></tfoot>
                      <i id='oXjgf'><tr id='oXjgf'><dt id='oXjgf'><q id='oXjgf'><span id='oXjgf'><b id='oXjgf'><form id='oXjgf'><ins id='oXjgf'></ins><ul id='oXjgf'></ul><sub id='oXjgf'></sub></form><legend id='oXjgf'></legend><bdo id='oXjgf'><pre id='oXjgf'><center id='oXjgf'></center></pre></bdo></b><th id='oXjgf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oXjgf'><tfoot id='oXjgf'></tfoot><dl id='oXjgf'><fieldset id='oXjgf'></fieldset></dl></div>
                      • <small id='oXjgf'></small><noframes id='oXjgf'>

                          主站蜘蛛池模板: 久久久久久久一区 | 国产亚洲久 | 欧美激情va永久在线播放 | 成人综合伊人 | 国产亚洲第一页 | 亚洲综合一区二区三区 | 亚洲国产精品久久久 | 国产精品久久久久不卡 | 国产精品美女久久久久久免费 | 亚洲国产精品久久久久 | 久久精品视频在线免费观看 | 中文字幕不卡 | 日韩中文字幕免费在线观看 | 免费一级欧美在线观看视频 | 国产成人亚洲精品 | 免费在线精品视频 | 91九色视频 | 国产精品一区二区在线 | 国产99免费视频 | 午夜视频免费网站 | 免费观看黄色一级片 | 久久精品欧美一区二区三区不卡 | 久久中文高清 | 日韩久久久久久久久久久 | 亚洲午夜一区二区 | 久久91av | 欧美一级在线观看 | 成人免费一区二区 | 国产欧美一区二区三区日本久久久 | 国产免费一区二区三区网站免费 | 香蕉久久a毛片 | 国产一区二区三区精品久久久 | 日韩视频一区二区在线 | 亚洲精品一区二区三区中文字幕 | 午夜视频一区 | 亚洲激情综合 | 欧美日韩不卡合集视频 | 国产精品久久久久久婷婷天堂 | 中文字幕日韩一区 | 欧美毛片免费观看 | 婷婷开心激情综合五月天 |