搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Firefox cancels an XHR $http.get request for an image, while the same works for Chrome?

  • 5 个回答
  • 1 人有此问题
  • 2 次查看
  • 最后回复者为 Neha_Pandey

more options

This question might have been answered before, but I couldn't find anything on it so I am posting this question.

In our application we have a grid which contains blob data. In this grid, for a blob that has an image attached to it we give a link, with the URL to access that link. On the click of this link we call $http.get. For some reason firefox aborts this request.

P.S : When we hit the same request using Fiddler we get the response on time.

Request you to please provide some insight on this issue.

This question might have been answered before, but I couldn't find anything on it so I am posting this question. In our application we have a grid which contains blob data. In this grid, for a blob that has an image attached to it we give a link, with the URL to access that link. On the click of this link we call $http.get. For some reason firefox aborts this request. P.S : When we hit the same request using Fiddler we get the response on time. Request you to please provide some insight on this issue.

所有回复 (5)

more options

Hi Neha, could you check both Firefox's Web Console and Browser Console for any error/warning/debug messages that could be related to this problem? You can access these from the menu or the keyboard shortcuts:

Web Console - opens in the lower part of the tab

  • "3-bar" menu button > Developer > Web Console
  • (menu bar) Tools > Web Developer > Web Console
  • Ctrl+Shift+k

Browser Console - opens in a separate window

  • "3-bar" menu button > Developer > Browser Console
  • (menu bar) Tools > Web Developer > Browser Console
  • Ctrl+Shift+j

Anything?

As a general note, beware of CORS issues between subdomains, e.g., www.example.com vs. example.com.

more options

Hi jscher2000, Thanks for your help, but no there aren't any errors or logs in any of the console windows.

more options

If you check Firefox's Network Monitor, are you getting an unexpected HTTP response code for the request? https://developer.mozilla.org/docs/Tools/Network_Monitor

If that doesn't provide any further insight, can you provide a link to a page demonstrating this problem?

more options

I am getting the following response :

HTTP/1.1 200 OK Cache-Control: private Content-Length: 466626 Content-Type: image/png Server: Microsoft-IIS/10.0 Access-Control-Allow-Origin: http://localhost:55198 Access-Control-Allow-Credentials: true Content-Disposition: attachment; filename=Screenshot_1.jpg; size=466626 X-AspNet-Version: 4.0.30319 X-SourceFiles: =?UTF-8?B?QzpcUHJvamVjdHNcU3l0b3Jpb1xFbnNlbWJsZVxSdW50aW1lXEFwaVxFbnNlbWJsZUZYLlJ1bnRpbWUuQXBpXGFwaVxDb21tb25CbG9iXDc2ZTIzNDAzLTQ3NTUtNDZiYS1iZjcxLTg3N2JlOGUzYWU2Yg==?= X-Powered-By: ASP.NET Date: Tue, 13 Jun 2017 12:45:43 GMT

But when I check the properties in Fiddler, I can see X-ABORTED-WHEN: SendingResponse

more options

Neha_Pandey said

In the Netwrok monitor there's not response header for this request but I am getting the following response if I hit the request using Fiddler :

HTTP/1.1 200 OK Cache-Control: private Content-Length: 466626 Content-Type: image/png Server: Microsoft-IIS/10.0 Access-Control-Allow-Origin: http://localhost:55198 Access-Control-Allow-Credentials: true Content-Disposition: attachment; filename=Screenshot_1.jpg; size=466626 X-AspNet-Version: 4.0.30319 X-SourceFiles: =?UTF-8?B?QzpcUHJvamVjdHNcU3l0b3Jpb1xFbnNlbWJsZVxSdW50aW1lXEFwaVxFbnNlbWJsZUZYLlJ1bnRpbWUuQXBpXGFwaVxDb21tb25CbG9iXDc2ZTIzNDAzLTQ3NTUtNDZiYS1iZjcxLTg3N2JlOGUzYWU2Yg==?= X-Powered-By: ASP.NET Date: Tue, 13 Jun 2017 12:45:43 GMT

But when I check the properties in Fiddler, I can see X-ABORTED-WHEN: SendingResponse

由Neha_Pandey于修改