Chrome浏览器是从ASP.NET的ashx处理PDF流 [英] Chrome is streaming PDF from ASP.NET ashx handler

查看:953
本文介绍了Chrome浏览器是从ASP.NET的ashx处理PDF流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看来,由于Chrome浏览器的新版本,浏览器试图让我的PDF(由ASP.NET处理程序生成)以块的形式,而不是在一个时间。但是,我的处理程序并不支持这一点。我怎样才能禁用此行为服务器端?

It seems that since the newer version of Chrome, the browser is trying to get my PDF (generated by an ASP.NET handler) in chunks instead of in one time. But my handler does not support this. How can i disable this behaviour server side ?

我提琴手检查它,我看到一个状态200的请求,并与状态504继多个请求。

I checked it with fiddler and I see a request with a status 200, and that following by multiple requests with status 504.

推荐答案

您可以告诉你不发送支持范围请求,在你的响应头客户端:

You can tell the client that you do not support range requests by sending, in your response headers:


Accept-Range: none

(见 RFC 。)

请注意:


  • 客户端可以忽略这个头。

  • 的RFC不说,你应该支持范围(这是当然,难以与动态内容)

这篇关于Chrome浏览器是从ASP.NET的ashx处理PDF流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆