gpt4 book ai didi

jquery - Chrome 和 Firefox CORS AJAX 调用在某些 Mac 计算机上中止

转载 作者:行者123 更新时间:2023-12-03 22:32:09 25 4
gpt4 key购买 nike

我们在 www.saddleback.com/live 上有一个网页,Chrome 和 Firefox CORS AJAX 调用在某些 Mac 计算机上会中止。在装有 OSX 10.9(最新更新)、Chrome 和 Firefox(最新更新)的 Mac 上,AJAX 调用 http://api.saddleback.com/WorshipService?version=2&null&_=1386201207191被中止。这适用于 Safari。

此行为是孤立的,但在某些机器上可重现,但在其他机器上则不然。我们还有其他具有相同操作系统和浏览器版本的 Mac 计算机,可以成功打开该网页。

我已验证 Web 服务器在 500 毫秒内成功响应 AJAX 请求。然而 Chrome 会等待响应大约 30 秒,并最终中止调用。我在下面添加了 chrome://net-internals 来表示失败的调用:

11645: URL_REQUEST
http://api.saddleback.com/WorshipService?version=2&null&_=1386201207191
Start Time: 2013-12-04 15:53:27.469

t=1386201207469 [st= 0] +REQUEST_ALIVE [dt=30398]
t=1386201207470 [st= 1] +URL_REQUEST_START_JOB [dt=30397]
--> load_flags = 143540480 (DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES | ENABLE_LOAD_TIMING | MAYBE_USER_GESTURE | REPORT_RAW_HEADERS | VERIFY_EV_CERT)
--> method = "GET"
--> priority = 2
--> url = "http://api.saddleback.com/WorshipService?version=2&null&_=1386201207191"
t=1386201207470 [st= 1] HTTP_CACHE_GET_BACKEND [dt=0]
t=1386201207470 [st= 1] HTTP_CACHE_OPEN_ENTRY [dt=0]
--> net_error = -2 (ERR_FAILED)
t=1386201207470 [st= 1] HTTP_CACHE_CREATE_ENTRY [dt=0]
t=1386201207470 [st= 1] HTTP_CACHE_ADD_TO_ENTRY [dt=0]
t=1386201207470 [st= 1] +HTTP_STREAM_REQUEST [dt=2]
t=1386201207472 [st= 3] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 11647 (HTTP_STREAM_JOB)
t=1386201207472 [st= 3] -HTTP_STREAM_REQUEST
t=1386201207472 [st= 3] +HTTP_TRANSACTION_SEND_REQUEST [dt=0]
t=1386201207472 [st= 3] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> GET /WorshipService?version=2&null&_=1386201207191 HTTP/1.1
Host: api.saddleback.com
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://www.saddleback.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Content-Type: application/json
Referer: http://www.saddleback.com/onlinecampus/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
t=1386201207472 [st= 3] -HTTP_TRANSACTION_SEND_REQUEST
t=1386201207472 [st= 3] +HTTP_TRANSACTION_READ_HEADERS [dt=30395]
t=1386201207472 [st= 3] +HTTP_STREAM_PARSER_READ_HEADERS [dt=30395]
t=1386201237867 [st=30398] CANCELLED
t=1386201237867 [st=30398] -URL_REQUEST_START_JOB
--> net_error = -3 (ERR_ABORTED)
t=1386201237867 [st=30398] -REQUEST_ALIVE

以下是 Wireshark 的请求和响应:

请求

GET /WorshipService?version=2&null&_=1386192341441 HTTP/1.1
[Expert Info (Chat/Sequence): GET /WorshipService?version=2&null&_=1386192341441 HTTP/1.1]
[Message: GET /WorshipService?version=2&null&_=1386192341441 HTTP/1.1]
[Severity level: Chat]
[Group: Sequence]
Request Method: GET
Request URI: /WorshipService?version=2&null&_=1386192341441
Request Version: HTTP/1.1
Host: api.saddleback.com
Connection: keep-alive
Cache-Control: max-age=0
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://www.saddleback.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Content-Type: application/json
Referer: http://www.saddleback.com/onlinecampus/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8

回应

HTTP/1.1 200 OK
[Expert Info (Chat/Sequence): HTTP/1.1 200 OK]
[Message: HTTP/1.1 200 OK]
[Severity level: Chat]
[Group: Sequence]
Request Version: HTTP/1.1
Status Code: 200
Response Phrase: OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: http://www.saddleback.com
Access-Control-Allow-Credentials: true
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 04 Dec 2013 21:25:41 GMT
Content-Length: 2841
[Content length: 2841]
Set-Cookie: NSC_ndxfc1-45*80=ffffffffaf181c9545525d5f4f58455e445a4a423660;expires=Wed, 04-Dec-2013 14:44:34 GMT;path=/;httponly

我花了太多时间试图弄清楚为什么在某些 Mac 配置上失败,而在其他配置上却失败。任何帮助将不胜感激。

最佳答案

花了很长时间查看低级网络数据包以尝试找到问题。事实证明,病毒扫描程序阻止了调用。关闭网络扫描,它开始工作。

简而言之,Sophos 在 Firefox 和 Chrome 上阻止了 api.saddleback.com,但在 Safari 上则不然。想想吧。

关于jquery - Chrome 和 Firefox CORS AJAX 调用在某些 Mac 计算机上中止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20389410/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com