Ben Croughs
Ben Croughs

Reputation: 2644

Chrome is streaming PDF from ASP.NET ashx handler

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 ?

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

Upvotes: 0

Views: 605

Answers (1)

Richard
Richard

Reputation: 108975

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

Accept-Range: none

(See the RFC.)

Note:

  • The client can ignore that header.
  • The RFCs do say you SHOULD support ranges (this is, of course, difficult with dynamic content)

Upvotes: 1

Related Questions