Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
10 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. hhead.cxx
  5. Abstract:
  6. This file contains autogenerated table values of a perfect hash function
  7. DO NOT, DO NOT EDIT THIS FILE, TO ADD HEADERS SEE hashgen.cpp
  8. Contents:
  9. GlobalKnownHeaders
  10. GlobalHeaderHashs
  11. Author:
  12. Arthur Bierer (arthurbi) 19-Dec-1997 (AND) my code generator[hashgen.exe]
  13. Revision History:
  14. --*/
  15. #include <wininetp.h>
  16. #include "httpp.h"
  17. #ifdef HEADER_HASH_SEED
  18. #if (HEADER_HASH_SEED != 1291949)
  19. #error HEADER_HASH_SEED has not been updated in the header file, please copy this number to the header
  20. #endif
  21. #else
  22. #define HEADER_HASH_SEED 1291949
  23. #endif
  24. #ifdef MAX_HEADER_HASH_SIZE
  25. #if (MAX_HEADER_HASH_SIZE != 153)
  26. #error MAX_HEADER_HASH_SIZE has not been updated in the header file, please copy this number to the header
  27. #endif
  28. #else
  29. #define MAX_HEADER_HASH_SIZE 153
  30. #endif
  31. #ifdef HTTP_QUERY_MAX
  32. #if (HTTP_QUERY_MAX != 78)
  33. #error HTTP_QUERY_MAX is not the same as the value used in wininet.h, this indicates mismatched headers, see hashgen.cpp
  34. #endif
  35. #endif
  36. //
  37. // GlobalHeaderHashs - array of precalculated hashes on case-sensetive set of known headers.
  38. // This array must be used with the same hash function used to generate it.
  39. // Note, all entries in this array are biased (++'ed) by 1 from HTTP_QUERY_ manifests in wininet.h.
  40. // 0-ed entries indicate error values
  41. //
  42. const BYTE GlobalHeaderHashs[MAX_HEADER_HASH_SIZE] = {
  43. 0, 0, 0, 71, 0, 0,
  44. 53, 0, 0, 0, 0, 0,
  45. 40, 60, 72, 0, 0, 0,
  46. 64, 61, 0, 28, 4, 0,
  47. 76, 57, 0, 30, 0, 8,
  48. 0, 15, 0, 0, 0, 0,
  49. 24, 0, 66, 29, 0, 0,
  50. 0, 0, 0, 0, 13, 14,
  51. 16, 33, 0, 0, 0, 68,
  52. 41, 0, 7, 0, 0, 0,
  53. 0, 0, 32, 17, 51, 48,
  54. 67, 11, 0, 0, 5, 0,
  55. 65, 2, 0, 0, 35, 6,
  56. 0, 0, 31, 50, 0, 0,
  57. 0, 49, 78, 26, 0, 0,
  58. 42, 0, 0, 43, 0, 27,
  59. 69, 9, 1, 0, 0, 18,
  60. 10, 79, 0, 3, 47, 55,
  61. 0, 44, 0, 56, 0, 70,
  62. 54, 52, 0, 0, 0, 0,
  63. 0, 0, 36, 62, 0, 0,
  64. 45, 0, 0, 12, 0, 73,
  65. 77, 0, 63, 0, 59, 0,
  66. 0, 0, 0, 58, 38, 0,
  67. 0, 0, 39, 25, 0, 37,
  68. 0, 34, 0,
  69. };
  70. //
  71. // GlobalKnownHeaders - array of HTTP request and response headers that we understand.
  72. // This array must be in the same order as the HTTP_QUERY_ manifests in WININET.H
  73. //
  74. #define HEADER_ENTRY(String, Flags, HashVal) String, sizeof(String) - 1, Flags, HashVal
  75. const struct KnownHeaderType GlobalKnownHeaders[HTTP_QUERY_MAX+1] = {
  76. HEADER_ENTRY("Mime-Version", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x179ED708),
  77. HEADER_ENTRY("Content-Type", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x8A50E357),
  78. HEADER_ENTRY("Content-Transfer-Encoding", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x562B730E),
  79. HEADER_ENTRY("Content-Id", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xE7ADCA82),
  80. HEADER_ENTRY("Content-Description", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x9D4EB3D9),
  81. HEADER_ENTRY("Content-Length", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_NUMBER), 0x4E02E517),
  82. HEADER_ENTRY("Content-Language", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xA6681019),
  83. HEADER_ENTRY("Allow", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x297A46CC),
  84. HEADER_ENTRY("Public", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x7C5DD44C),
  85. HEADER_ENTRY("Date", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0xBB71C70B),
  86. HEADER_ENTRY("Expires", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0xC153144D),
  87. HEADER_ENTRY("Last-Modified", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0x23617A4F),
  88. HEADER_ENTRY("Message-id", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xC9AE6FAC),
  89. HEADER_ENTRY("Uri", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xCF60D45D),
  90. HEADER_ENTRY("Derived-From", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x6AAF4091),
  91. HEADER_ENTRY("Cost", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBB717626),
  92. HEADER_ENTRY("Link", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBB764B5B),
  93. HEADER_ENTRY("Pragma", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x7C26E9A5),
  94. HEADER_ENTRY("", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x0),
  95. HEADER_ENTRY("", HTTP_QUERY_FLAG_NUMBER, 0x0),
  96. HEADER_ENTRY("", 0, 0x0),
  97. HEADER_ENTRY("", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x0),
  98. HEADER_ENTRY("", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x0),
  99. HEADER_ENTRY("Connection", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x190A507D),
  100. HEADER_ENTRY("Accept", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x581B295D),
  101. HEADER_ENTRY("Accept-Charset", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xC87564B4),
  102. HEADER_ENTRY("Accept-Encoding", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x81EEF031),
  103. HEADER_ENTRY("Accept-Language", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x2827D6EE),
  104. HEADER_ENTRY("Authorization", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xEC768B9E),
  105. HEADER_ENTRY("Content-Encoding", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x2F295C),
  106. HEADER_ENTRY("Forwarded", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x420550EB),
  107. HEADER_ENTRY("From", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBB732781),
  108. HEADER_ENTRY("If-Modified-Since", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0x88B69529),
  109. HEADER_ENTRY("Location", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x8DD3A2C6),
  110. HEADER_ENTRY("Orig-Uri", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x47CCA2FB),
  111. HEADER_ENTRY("Referer", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x7CFEFF98),
  112. HEADER_ENTRY("Retry-After", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0xD2881822),
  113. HEADER_ENTRY("Server", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x8244B644),
  114. HEADER_ENTRY("Title", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x2AD094CF),
  115. HEADER_ENTRY("User-Agent", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x968679A8),
  116. HEADER_ENTRY("WWW-Authenticate", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x21BED5E),
  117. HEADER_ENTRY("Proxy-Authenticate", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBE0F117B),
  118. HEADER_ENTRY("Accept-Ranges", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xC3BF828A),
  119. HEADER_ENTRY("Set-Cookie", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xC704A760),
  120. HEADER_ENTRY("Cookie", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x5DA54DC7),
  121. HEADER_ENTRY("", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x0),
  122. HEADER_ENTRY("Refresh", 0, 0x7D05EAFC),
  123. HEADER_ENTRY("Content-Disposition", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xDCB6FC4A),
  124. HEADER_ENTRY("Age", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xCF607DDA),
  125. HEADER_ENTRY("Cache-Control", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBBD3B86F),
  126. HEADER_ENTRY("Content-Base", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x8A469ED0),
  127. HEADER_ENTRY("Content-Location", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xC201A76E),
  128. HEADER_ENTRY("Content-Md5", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xDD672BFB),
  129. HEADER_ENTRY("Content-Range", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xD43BEC42),
  130. HEADER_ENTRY("Etag", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBB72A1CE),
  131. HEADER_ENTRY("Host", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBB74340B),
  132. HEADER_ENTRY("If-Match", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x971A5776),
  133. HEADER_ENTRY("If-None-Match", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xCF6E9D3),
  134. HEADER_ENTRY("If-Range", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x9774B8F6),
  135. HEADER_ENTRY("If-Unmodified-Since", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0xC946042C),
  136. HEADER_ENTRY("Max-Forwards", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x3C693EC8),
  137. HEADER_ENTRY("Proxy-Authorization", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x96A221ED),
  138. HEADER_ENTRY("Range", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x2AA7E69A),
  139. HEADER_ENTRY("Transfer-Encoding", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBD09B166),
  140. HEADER_ENTRY("Upgrade", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x7DAF65B5),
  141. HEADER_ENTRY("Vary", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xBB7BA5AF),
  142. HEADER_ENTRY("Via", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xCF60D76D),
  143. HEADER_ENTRY("Warning", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xF56B7D23),
  144. HEADER_ENTRY("Expect", (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME), 0x62F2EDB6),
  145. HEADER_ENTRY("Proxy-Connection", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xD79F12C),
  146. HEADER_ENTRY("Unless-Modified-Since", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x8E53B934),
  147. HEADER_ENTRY("Ms-Echo-Request", 0, 0xBB7AF4AF),
  148. HEADER_ENTRY("Ms-Echo-Reply", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xA5326612),
  149. HEADER_ENTRY("", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x0),
  150. HEADER_ENTRY("", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x0),
  151. HEADER_ENTRY("Proxy-Support", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x7C4F7F99),
  152. HEADER_ENTRY("Authentication-Info", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xB03F47E6),
  153. HEADER_ENTRY("PassportURLs", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0xCF7C676F),
  154. HEADER_ENTRY("PassportConfig", HTTP_QUERY_FLAG_REQUEST_HEADERS, 0x7601C9BF),
  155. };