0

Is there any way to change value of Date header, returned in response? I tried to set header on HttpResponse message in WebAPI action.

When I do this in OWIN configuration

app.Use((c, a) =>
            {

                c.Response.OnSendingHeaders(o =>
                    {
                        c.Response.Headers.Clear();
                    }, null);
                return a();
            });

I still receive 3 headers:

Content-Length: 3705
Server: Microsoft-HTTPAPI/2.0
Date: Sat, 29 Mar 2014 18:53:32 GMT

Is there any way to change value of them? Look like they are being set on very low level in pipeline.

Oleh Nechytailo
  • 2,155
  • 17
  • 26

1 Answers1

0

As per w3, origin server MUST include a Date header field in all responses, except in few cases. read here more

If you check Katana code you will see there is a method called SendKnownResponseHeader in KatanaWorkerRequest class of Boot.AspNet namespace. So, yes it is added in the pipeline.

Wondering why you want to change these headers?

Rafat Sarosh
  • 989
  • 7
  • 16