ResponseHeaders.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace ServerLib
  8. {
  9. public enum ResponseHeaders
  10. {
  11. /// <summary>
  12. /// Cache-Control 标头,指定请求/响应链上所有缓存机制必须服从的缓存指令。
  13. /// </summary>
  14. [Description("Cache-Control")]
  15. CacheControl = 0,
  16. /// <summary>
  17. /// Connection 标头,指定特定连接需要的选项。
  18. /// </summary>
  19. [Description("Connection")]
  20. Connection = 1,
  21. /// <summary>
  22. /// Date 标头,指定响应产生的日期和时间。
  23. /// </summary>
  24. [Description("Date")]
  25. Date = 2,
  26. /// <summary>
  27. /// Keep-Alive 标头,指定用于维护持久连接的参数。
  28. /// </summary>
  29. [Description("Keep-Alive")]
  30. KeepAlive = 3,
  31. /// <summary>
  32. /// Pragma 标头,指定可应用于请求/响应链上的任何代理的特定于实现的指令。
  33. /// </summary>
  34. [Description("Pragma")]
  35. Pragma = 4,
  36. /// <summary>
  37. /// Trailer 标头,指定指示的标头字段在消息(使用分块传输编码方法进行编码)的尾部显示。
  38. /// </summary>
  39. [Description("Trailer")]
  40. Trailer = 5,
  41. /// <summary>
  42. /// Transfer-Encoding 标头,指定对消息正文应用哪种类型的转换(如果有)。
  43. /// </summary>
  44. [Description("Transfer-Encoding")]
  45. TransferEncoding = 6,
  46. /// <summary>
  47. /// Upgrade 标头,指定客户端支持的附加通信协议。
  48. /// </summary>
  49. [Description("Upgrade")]
  50. Upgrade = 7,
  51. /// <summary>
  52. /// Via 标头,指定网关和代理程序要使用的中间协议。
  53. /// </summary>
  54. [Description("Via")]
  55. Via = 8,
  56. /// <summary>
  57. /// Warning 标头,指定关于可能未在消息中反映的消息的状态或转换的附加信息。
  58. /// </summary>
  59. [Description("Warning")]
  60. Warning = 9,
  61. /// <summary>
  62. /// Allow 标头,指定支持的 HTTP 方法集。
  63. /// </summary>
  64. [Description("Allow")]
  65. Allow = 10,
  66. /// <summary>
  67. /// Content-Length 标头,指定伴随正文数据的长度(以字节为单位)。
  68. /// </summary>
  69. [Description("Content-Length")]
  70. ContentLength = 11,
  71. /// <summary>
  72. /// Content-Type 标头,指定伴随正文数据的 MIME 类型。
  73. /// </summary>
  74. [Description("Content-Type")]
  75. ContentType = 12,
  76. /// <summary>
  77. /// Content-Encoding 标头,指定已应用于伴随正文数据的编码。
  78. /// </summary>
  79. [Description("Content-Encoding")]
  80. ContentEncoding = 13,
  81. /// <summary>
  82. /// Content-Langauge 标头,指定自然语言或伴随正文数据的语言。
  83. /// </summary>
  84. [Description("Content-Langauge")]
  85. ContentLanguage = 14,
  86. /// <summary>
  87. /// Content-Location 标头,指定可以从中获取伴随正文的 URI。
  88. /// </summary>
  89. [Description("Content-Location")]
  90. ContentLocation = 15,
  91. /// <summary>
  92. /// Content-MD5 标头,指定伴随正文数据的 MD5 摘要,用于提供端到端消息完整性检查。
  93. /// </summary>
  94. [Description("Content-MD5")]
  95. ContentMd5 = 16,
  96. /// <summary>
  97. /// Range 标头,指定客户端请求返回的响应的单个或多个子范围来代替整个响应。
  98. /// </summary>
  99. [Description("Range")]
  100. ContentRange = 17,
  101. /// <summary>
  102. /// Expires 标头,指定日期和时间,在此之后伴随的正文数据应视为陈旧的。
  103. /// </summary>
  104. [Description("Expires")]
  105. Expires = 18,
  106. /// <summary>
  107. /// Last-Modified 标头,指定上次修改伴随的正文数据的日期和时间。
  108. /// </summary>
  109. [Description("Last-Modified")]
  110. LastModified = 19,
  111. /// <summary>
  112. /// Accept-Ranges 标头,指定服务器接受的范围。
  113. /// </summary>
  114. [Description("Accept-Ranges")]
  115. AcceptRanges = 20,
  116. /// <summary>
  117. /// Age 标头,指定自起始服务器生成响应以来的时间长度(以秒为单位)。
  118. /// </summary>
  119. [Description("Age")]
  120. Age = 21,
  121. /// <summary>
  122. /// Etag 标头,指定请求的变量的当前值。
  123. /// </summary>
  124. [Description("Etag")]
  125. ETag = 22,
  126. /// <summary>
  127. /// Location 标头,指定为获取请求的资源而将客户端重定向到的 URI。
  128. /// </summary>
  129. [Description("Location")]
  130. Location = 23,
  131. /// <summary>
  132. /// Proxy-Authenticate 标头,指定客户端必须对代理验证其自身。
  133. /// </summary>
  134. [Description("Proxy-Authenticate")]
  135. ProxyAuthenticate = 24,
  136. /// <summary>
  137. /// Retry-After 标头,指定某个时间(以秒为单位)或日期和时间,在此时间之后客户端可以重试其请求。
  138. /// </summary>
  139. [Description("Retry-After")]
  140. RetryAfter = 25,
  141. /// <summary>
  142. /// Server 标头,指定关于起始服务器代理的信息。
  143. /// </summary>
  144. [Description("Server")]
  145. Server = 26,
  146. /// <summary>
  147. /// Set-Cookie 标头,指定提供给客户端的 Cookie 数据。
  148. /// </summary>
  149. [Description("Set-Cookie")]
  150. SetCookie = 27,
  151. /// <summary>
  152. /// Vary 标头,指定用于确定缓存的响应是否为新响应的请求标头。
  153. /// </summary>
  154. [Description("Vary")]
  155. Vary = 28,
  156. /// <summary>
  157. /// WWW-Authenticate 标头,指定客户端必须对服务器验证其自身。
  158. /// </summary>
  159. [Description("WWW-Authenticate")]
  160. WwwAuthenticate = 29,
  161. }
  162. }