RequestHeaders.cs 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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 RequestHeaders
  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 标头,指定标头字段显示在以 chunked 传输编码方式编码的消息的尾部。
  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. /// Content-Range 标头,指定在完整正文中应用伴随部分正文数据的位置。
  98. /// </summary>
  99. [Description("Content-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 标头,指定响应可接受的 MIME 类型。
  113. /// </summary>
  114. [Description("Accept")]
  115. Accept = 20,
  116. /// <summary>
  117. /// Accept-Charset 标头,指定响应可接受的字符集。
  118. /// </summary>
  119. [Description("Accept-Charset")]
  120. AcceptCharset = 21,
  121. /// <summary>
  122. /// Accept-Encoding 标头,指定响应可接受的内容编码。
  123. /// </summary>
  124. [Description("Accept-Encoding")]
  125. AcceptEncoding = 22,
  126. /// <summary>
  127. /// Accept-Langauge 标头,指定响应首选的自然语言。
  128. /// </summary>
  129. [Description("Accept-Langauge")]
  130. AcceptLanguage = 23,
  131. /// <summary>
  132. /// Authorization 标头,指定客户端为向服务器验证自身身份而出示的凭据。
  133. /// </summary>
  134. [Description("Authorization")]
  135. Authorization = 24,
  136. /// <summary>
  137. /// Cookie 标头,指定向服务器提供的 Cookie 数据。
  138. /// </summary>
  139. [Description("Cookie")]
  140. Cookie = 25,
  141. /// <summary>
  142. /// Expect 标头,指定客户端要求的特定服务器行为。
  143. /// </summary>
  144. [Description("Expect")]
  145. Expect = 26,
  146. /// <summary>
  147. /// From 标头,指定控制请求用户代理的用户的 Internet 电子邮件地址。
  148. /// </summary>
  149. [Description("From")]
  150. From = 27,
  151. /// <summary>
  152. /// Host 标头,指定所请求资源的主机名和端口号。
  153. /// </summary>
  154. [Description("Host")]
  155. Host = 28,
  156. /// <summary>
  157. /// If-Match 标头,指定仅当客户端的指示资源的缓存副本是最新的时,才执行请求的操作。
  158. /// </summary>
  159. [Description("If-Match")]
  160. IfMatch = 29,
  161. /// <summary>
  162. /// If-Modified-Since 标头,指定仅当自指示的数据和时间之后修改了请求的资源时,才执行请求的操作。
  163. /// </summary>
  164. [Description("If-Modified-Since")]
  165. IfModifiedSince = 30,
  166. /// <summary>
  167. /// If-None-Match 标头,指定仅当客户端的指示资源的缓存副本都不是最新的时,才执行请求的操作。
  168. /// </summary>
  169. [Description("If-None-Match")]
  170. IfNoneMatch = 31,
  171. /// <summary>
  172. /// If-Range 标头,指定如果客户端的缓存副本是最新的,仅发送指定范围的请求资源。
  173. /// </summary>
  174. [Description("If-Range")]
  175. IfRange = 32,
  176. /// <summary>
  177. /// If-Unmodified-Since 标头,指定仅当自指示的日期和时间之后修改了请求的资源时,才执行请求的操作。
  178. /// </summary>
  179. [Description("If-Unmodified-Since")]
  180. IfUnmodifiedSince = 33,
  181. /// <summary>
  182. /// Max-Forwards 标头,指定一个整数,表示此请求还可转发的次数。
  183. /// </summary>
  184. [Description("Max-Forwards")]
  185. MaxForwards = 34,
  186. /// <summary>
  187. /// Proxy-Authorization 标头,指定客户端为向代理验证自身身份而出示的凭据。
  188. /// </summary>
  189. [Description("Proxy-Authorization")]
  190. ProxyAuthorization = 35,
  191. /// <summary>
  192. /// Referer 标头,指定从中获得请求 URI 的资源的 URI。
  193. /// </summary>
  194. [Description("Referer")]
  195. Referer = 36,
  196. /// <summary>
  197. /// Range 标头,指定代替整个响应返回的客户端请求的响应的子范围。
  198. /// </summary>
  199. [Description("Range")]
  200. Range = 37,
  201. /// <summary>
  202. /// TE 标头,指定响应可接受的传输编码方式。
  203. /// </summary>
  204. [Description("TE")]
  205. Te = 38,
  206. /// <summary>
  207. /// Translate 标头,与 WebDAV 功能一起使用的 HTTP 规范的 Microsoft 扩展。
  208. /// </summary>
  209. [Description("Translate")]
  210. Translate = 39,
  211. /// <summary>
  212. /// User-Agent 标头,指定有关客户端代理的信息。
  213. /// </summary>
  214. [Description("User-Agent")]
  215. UserAgent = 40,
  216. }
  217. }