3

Same issue as this question which was for Core 1. This issue has not gone away in Core 2. Have a simple web page that requests JSON which works perfectly locally but when published to an Azure app, it chucks the response. Chunking is turned off in Azure by default so I have no clue why this is happening or how to turn it off. The JSON request is huge but this was never a problem before Core as you could set a MaxJsonLength. Any ideas how to resolve this in Core 2 when published to an Azure app?

Response Headers Locally:

content-type:application/json; charset=utf-8
date:Thu, 15 Feb 2018 15:29:01 GMT
server:Kestrel
status:200
x-powered-by:ASP.NET
x-sourcefiles:=?UTF-8?B?QzpcVXNlcnNcTWFyYXRob25Db25zdWx0YW50XERlc2t0b3BcUHJvamVjdHNcVGF5bG9yTWFkZVxXSE1TMlxXaG1zMi5XZWJcQXBwb2ludG1lbnRcUmVhZA==?=
x-stackifyid:V1|b2e4b90c-648e-4405-9374-93dc48422382|

Response Headers on Azure:

Content-Encoding:gzip
Content-Type:application/json; charset=utf-8
Date:Thu, 15 Feb 2018 15:23:42 GMT
Server:Kestrel
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:ASP.NET
John81
  • 3,726
  • 6
  • 38
  • 58
  • In production, your response compression (gzip) is being applied. I'm pretty sure this is where the `Transfer-Encoding: chunked` is coming from, as the gzip is streamed. I'm not sure why you want or think you need to get rid of this header, though? – Chris Pratt Feb 15 '18 at 16:33
  • Because a 3rd party control is using the JSON and it has no idea what to do with a chunked response. It needs the entire JSON result to render properly. – John81 Feb 15 '18 at 20:00
  • Chunking it's a transport concern, it should be invisible unless you're reading from the raw socket. – Tratcher Feb 16 '18 at 00:43
  • did you find a solution ? – riadh gomri Jun 21 '18 at 09:15

0 Answers0