HttpResponse.HeaderEncoding Property
Assembly: System.Web (in system.web.dll)
/** @property */ public Encoding get_HeaderEncoding () /** @property */ public void set_HeaderEncoding (Encoding value)
public function get HeaderEncoding () : Encoding public function set HeaderEncoding (value : Encoding)
Property Value
An Encoding containing information regarding the character set for the current header.The HeaderEncoding property gives you the ability to disable or change the Encoding object on a response header using either the ASCIIEncoding, UnicodeEncoding, UTF7Encoding, or UTF8Encoding object. The default encoding value is the T:System.Text.UTF8Encoding class.
Changing the type of the HeaderEncoding property potentially could invite certain malicious attacks or cause undesired data to be sent through the response header. Header injection attacks are avoided in part by leaving the HeaderEncoding property of a response to the default setting. An attack against a vulnerable application could echo back entrusted data as part of a response header. If the HeaderEncoding is disabled due to a requirement for continuation lines in a header or if any header is constructed based on the result of untrusted data, the header data should be validated prior to sending to the response stream.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.