My target is to send my own items of header of HTTP Response using Server.TransferRequest.
I'm trying to do something like that:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
var headers = new NameValueCollection
{
{"ErrorUrl", Context.Request.RawUrl},
{"ErrorCode", code.ToString()}
};
Server.TransferRequest("~400.html", true, "GET", headers);
But Chrome shows me in Response Headers:
Accept-Ranges:bytes
Content-Length:573
Content-Type:text/html
Date:Wed, 10 Aug 2016 14:32:36 GMT
ETag:"a9d0dad4fbd1d11:0"
Last-Modified:Wed, 29 Jun 2016 11:46:10 GMT
X-Content-Type-Options:nosniff
X-Frame-Options:deny
X-SourceFiles:=?UTF-8?B?RDpcS0ZTXE1haW5cUHJvZHVjdFxLREMuVXNlcldlYlxLREMuVXNlcldlYi5XZWJSb2xlXHNyY1xWaWV3c1xlcnJvclxlbi1VU1w0MDMuaHRtbA==?=
X-XSS-Protection:1
Please, help me to get expected header. Thanks