Evren Bingøl
Evren Bingøl

Reputation: 1725

Edit HTTP header connection

Is there a way to edit the HTTP header "connection" in MVC. I tried the Add and AppendHeader functions; they all work, but you cannot edit the connection header.

I know that MVC provides certain standard HTTP headers to be modified by making some of the header values a public variable of that request for editing, such as StatusCode, but is there a way to edit the connection?

Upvotes: 0

Views: 434

Answers (1)

Alexei Levenkov
Alexei Levenkov

Reputation: 100600

You can't really change/set headers on incoming request ("connection" is set by client side of the request, usually browser). You can add such header to response, but it will have no meaning to either side (server or browser)

HTTP/1.1 - Header Filed Definituions - Connection:

The Connection general-header field allows the sender to specify options that are desired for that particular connection

Upvotes: 1

Related Questions