Hi
I had to send to user a xml-data (don't confuse with "text/html" mime), but in browser I see, that Content-Length header is missing.
I googled several hours and found several solutions but all of them does not work.
context.Response.Clear();context.Response.StatusCode = 200;context.Response.ContentType = "text/html";context.Response.Output.Write(body);context.Response.Flush();context.Response.SuppressContent = true;context.ApplicationInstance.CompleteRequest();
Also I already tried to manualy add "Content-Lenght" header with body.Length but on result it disappear!
My response headers from brouser:
Cache-Control: privateContent-Encoding: gzipContent-Language: en-USContent-Security-Policy: frame-ancestors 'self';Content-Type: text/html; charset=utf-8Date: Wed, 22 Apr 2020 10:11:24 GMTKeep-Alive: timeout=15, max=97Last-Modified: Tue, 21 Apr 2020 08:24:00 GMTServer: Microsoft-IIS/10.0Transfer-Encoding: chunkedVary: User-Agent,Accept-EncodingX-Content-Type-Options: nosniffX-FRAME-OPTIONS: SAMEORIGINX-Powered-By: ASP.NETX-Telligent-Evolution: 10.xX-UA-Compatible: IE=EdgeX-XSS-Protection: 1; mode=block
I think part of the problem is in "Transfer-Encoding: chunked"
Can anyone help me?
format
[edited by: Iurii Luzan at 10:41 AM (GMT 0) on Wed, Apr 22 2020]