oversip_p 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +22 -0
  3. data/LICENSE +25 -0
  4. data/README.md +43 -0
  5. data/Rakefile +54 -0
  6. data/bin/oversip +184 -0
  7. data/etc/oversip.conf +274 -0
  8. data/etc/proxies.conf +145 -0
  9. data/etc/server.rb +315 -0
  10. data/etc/tls/ca/cacert.pem +3894 -0
  11. data/etc/tls/demo-tls.oversip.net.crt +17 -0
  12. data/etc/tls/demo-tls.oversip.net.key +15 -0
  13. data/etc/tls/upgrade-cacert.sh +12 -0
  14. data/etc/tls/utils/create-cert.rb +162 -0
  15. data/etc/tls/utils/get-sip-identities.rb +95 -0
  16. data/ext/common/c_util.h +74 -0
  17. data/ext/common/ruby_c_util.h +88 -0
  18. data/ext/sip_parser/common_headers.h +210 -0
  19. data/ext/sip_parser/ext_help.h +18 -0
  20. data/ext/sip_parser/extconf.rb +3 -0
  21. data/ext/sip_parser/sip_message_parser.c +29741 -0
  22. data/ext/sip_parser/sip_parser.h +250 -0
  23. data/ext/sip_parser/sip_parser_ruby.c +1370 -0
  24. data/ext/sip_parser/sip_uri_parser.c +39699 -0
  25. data/ext/stud/extconf.rb +43 -0
  26. data/ext/stun/ext_help.h +16 -0
  27. data/ext/stun/extconf.rb +3 -0
  28. data/ext/stun/stun_ruby.c +394 -0
  29. data/ext/utils/ext_help.h +14 -0
  30. data/ext/utils/extconf.rb +3 -0
  31. data/ext/utils/haproxy_protocol.c +6163 -0
  32. data/ext/utils/haproxy_protocol.h +27 -0
  33. data/ext/utils/ip_utils.c +5952 -0
  34. data/ext/utils/ip_utils.h +64 -0
  35. data/ext/utils/outbound_utils.c +3227 -0
  36. data/ext/utils/outbound_utils.h +27 -0
  37. data/ext/utils/utils_ruby.c +392 -0
  38. data/ext/utils/utils_ruby.h +76 -0
  39. data/ext/websocket_framing_utils/ext_help.h +18 -0
  40. data/ext/websocket_framing_utils/extconf.rb +3 -0
  41. data/ext/websocket_framing_utils/ws_framing_utils.h +47 -0
  42. data/ext/websocket_framing_utils/ws_framing_utils_ruby.c +135 -0
  43. data/ext/websocket_http_parser/ext_help.h +18 -0
  44. data/ext/websocket_http_parser/extconf.rb +3 -0
  45. data/ext/websocket_http_parser/ws_http_parser.c +1635 -0
  46. data/ext/websocket_http_parser/ws_http_parser.h +87 -0
  47. data/ext/websocket_http_parser/ws_http_parser_ruby.c +630 -0
  48. data/lib/oversip/config.rb +597 -0
  49. data/lib/oversip/config_validators.rb +126 -0
  50. data/lib/oversip/default_server.rb +52 -0
  51. data/lib/oversip/errors.rb +10 -0
  52. data/lib/oversip/fiber_pool.rb +56 -0
  53. data/lib/oversip/launcher.rb +635 -0
  54. data/lib/oversip/logger.rb +84 -0
  55. data/lib/oversip/modules/outbound_mangling.rb +56 -0
  56. data/lib/oversip/modules/user_assertion.rb +73 -0
  57. data/lib/oversip/proxies_config.rb +189 -0
  58. data/lib/oversip/ruby_ext/eventmachine.rb +38 -0
  59. data/lib/oversip/sip/client.rb +428 -0
  60. data/lib/oversip/sip/client_transaction.rb +586 -0
  61. data/lib/oversip/sip/constants.rb +88 -0
  62. data/lib/oversip/sip/core.rb +217 -0
  63. data/lib/oversip/sip/launcher.rb +221 -0
  64. data/lib/oversip/sip/listeners/connection.rb +54 -0
  65. data/lib/oversip/sip/listeners/ipv4_tcp_client.rb +21 -0
  66. data/lib/oversip/sip/listeners/ipv4_tcp_server.rb +22 -0
  67. data/lib/oversip/sip/listeners/ipv4_tls_client.rb +21 -0
  68. data/lib/oversip/sip/listeners/ipv4_tls_server.rb +22 -0
  69. data/lib/oversip/sip/listeners/ipv4_tls_tunnel_server.rb +22 -0
  70. data/lib/oversip/sip/listeners/ipv4_udp_server.rb +21 -0
  71. data/lib/oversip/sip/listeners/ipv6_tcp_client.rb +21 -0
  72. data/lib/oversip/sip/listeners/ipv6_tcp_server.rb +22 -0
  73. data/lib/oversip/sip/listeners/ipv6_tls_client.rb +21 -0
  74. data/lib/oversip/sip/listeners/ipv6_tls_server.rb +22 -0
  75. data/lib/oversip/sip/listeners/ipv6_tls_tunnel_server.rb +22 -0
  76. data/lib/oversip/sip/listeners/ipv6_udp_server.rb +21 -0
  77. data/lib/oversip/sip/listeners/tcp_client.rb +97 -0
  78. data/lib/oversip/sip/listeners/tcp_connection.rb +202 -0
  79. data/lib/oversip/sip/listeners/tcp_server.rb +71 -0
  80. data/lib/oversip/sip/listeners/tls_client.rb +125 -0
  81. data/lib/oversip/sip/listeners/tls_server.rb +88 -0
  82. data/lib/oversip/sip/listeners/tls_tunnel_connection.rb +89 -0
  83. data/lib/oversip/sip/listeners/tls_tunnel_server.rb +61 -0
  84. data/lib/oversip/sip/listeners/udp_connection.rb +214 -0
  85. data/lib/oversip/sip/listeners.rb +24 -0
  86. data/lib/oversip/sip/message.rb +177 -0
  87. data/lib/oversip/sip/message_processor.rb +213 -0
  88. data/lib/oversip/sip/name_addr.rb +51 -0
  89. data/lib/oversip/sip/proxy.rb +324 -0
  90. data/lib/oversip/sip/request.rb +179 -0
  91. data/lib/oversip/sip/response.rb +37 -0
  92. data/lib/oversip/sip/rfc3263.rb +643 -0
  93. data/lib/oversip/sip/server_transaction.rb +295 -0
  94. data/lib/oversip/sip/sip.rb +76 -0
  95. data/lib/oversip/sip/tags.rb +39 -0
  96. data/lib/oversip/sip/timers.rb +55 -0
  97. data/lib/oversip/sip/transport_manager.rb +130 -0
  98. data/lib/oversip/sip/uac.rb +89 -0
  99. data/lib/oversip/sip/uac_request.rb +84 -0
  100. data/lib/oversip/sip/uri.rb +208 -0
  101. data/lib/oversip/syslog.rb +68 -0
  102. data/lib/oversip/system_callbacks.rb +45 -0
  103. data/lib/oversip/tls.rb +172 -0
  104. data/lib/oversip/utils.rb +30 -0
  105. data/lib/oversip/version.rb +21 -0
  106. data/lib/oversip/websocket/constants.rb +55 -0
  107. data/lib/oversip/websocket/http_request.rb +59 -0
  108. data/lib/oversip/websocket/launcher.rb +183 -0
  109. data/lib/oversip/websocket/listeners/connection.rb +51 -0
  110. data/lib/oversip/websocket/listeners/ipv4_ws_server.rb +22 -0
  111. data/lib/oversip/websocket/listeners/ipv4_wss_server.rb +22 -0
  112. data/lib/oversip/websocket/listeners/ipv4_wss_tunnel_server.rb +22 -0
  113. data/lib/oversip/websocket/listeners/ipv6_ws_server.rb +22 -0
  114. data/lib/oversip/websocket/listeners/ipv6_wss_server.rb +22 -0
  115. data/lib/oversip/websocket/listeners/ipv6_wss_tunnel_server.rb +22 -0
  116. data/lib/oversip/websocket/listeners/ws_server.rb +331 -0
  117. data/lib/oversip/websocket/listeners/wss_server.rb +88 -0
  118. data/lib/oversip/websocket/listeners/wss_tunnel_server.rb +133 -0
  119. data/lib/oversip/websocket/listeners.rb +13 -0
  120. data/lib/oversip/websocket/websocket.rb +13 -0
  121. data/lib/oversip/websocket/ws_framing.rb +545 -0
  122. data/lib/oversip/websocket/ws_sip_app.rb +120 -0
  123. data/lib/oversip.rb +127 -0
  124. data/test/oversip_test_helper.rb +19 -0
  125. data/test/test_http_parser.rb +73 -0
  126. data/test/test_name_addr.rb +27 -0
  127. data/test/test_name_addr_parser.rb +24 -0
  128. data/test/test_sip_message_parser.rb +168 -0
  129. data/test/test_sip_uri_parser.rb +56 -0
  130. data/test/test_uri.rb +68 -0
  131. data/thirdparty/stud/stud.tar.gz +0 -0
  132. metadata +334 -0
@@ -0,0 +1,1635 @@
1
+
2
+ #line 1 "ws_http_parser.rl"
3
+ #include "ws_http_parser.h"
4
+ #include "ext_help.h"
5
+ #include <stdio.h>
6
+ #include <assert.h>
7
+ #include <stdlib.h>
8
+ #include <ctype.h>
9
+ #include <string.h>
10
+
11
+ #define MARK(M, FPC) (parser->M = (FPC) - buffer)
12
+ #define LEN(AT, FPC) (FPC - buffer - parser->AT)
13
+ #define PTR_TO(F) (buffer + parser->F)
14
+
15
+
16
+
17
+ /** machine **/
18
+
19
+ #line 138 "ws_http_parser.rl"
20
+
21
+
22
+ /** Data **/
23
+
24
+ #line 25 "ws_http_parser.c"
25
+ static const char _ws_http_request_parser_actions[] = {
26
+ 0, 1, 0, 1, 2, 1, 3, 1,
27
+ 4, 1, 5, 1, 12, 1, 13, 1,
28
+ 14, 1, 15, 1, 17, 1, 18, 1,
29
+ 21, 1, 26, 1, 27, 2, 3, 0,
30
+ 2, 3, 4, 2, 5, 1, 2, 9,
31
+ 10, 2, 12, 11, 2, 13, 14, 2,
32
+ 14, 11, 2, 16, 11, 2, 18, 4,
33
+ 2, 19, 4, 2, 20, 4, 2, 21,
34
+ 4, 2, 22, 4, 2, 23, 4, 2,
35
+ 24, 4, 2, 25, 4, 2, 26, 4,
36
+ 3, 6, 9, 10, 3, 7, 9, 10,
37
+ 3, 8, 9, 10, 3, 13, 14, 11,
38
+ 3, 15, 16, 11
39
+ };
40
+
41
+ static const short _ws_http_request_parser_key_offsets[] = {
42
+ 0, 0, 17, 32, 33, 41, 43, 45,
43
+ 47, 49, 50, 52, 55, 57, 60, 61,
44
+ 86, 87, 104, 107, 113, 119, 120, 147,
45
+ 166, 185, 206, 225, 244, 263, 282, 301,
46
+ 320, 337, 340, 357, 358, 360, 376, 392,
47
+ 396, 397, 399, 402, 419, 420, 422, 438,
48
+ 439, 466, 485, 504, 523, 540, 543, 556,
49
+ 557, 559, 571, 580, 588, 597, 603, 614,
50
+ 622, 630, 636, 639, 642, 644, 645, 648,
51
+ 651, 654, 657, 663, 669, 675, 678, 687,
52
+ 696, 705, 714, 723, 734, 745, 756, 770,
53
+ 783, 792, 801, 813, 824, 833, 842, 854,
54
+ 865, 874, 883, 895, 906, 913, 920, 927,
55
+ 934, 935, 942, 949, 956, 963, 964, 971,
56
+ 978, 985, 992, 993, 1000, 1007, 1014, 1021,
57
+ 1022, 1029, 1036, 1043, 1050, 1051, 1058, 1065,
58
+ 1072, 1079, 1080, 1090, 1098, 1103, 1104, 1109,
59
+ 1110, 1115, 1116, 1118, 1121, 1124, 1130, 1133,
60
+ 1136, 1139, 1145, 1148, 1151, 1154, 1160, 1163,
61
+ 1170, 1177, 1178, 1185, 1192, 1199, 1206, 1214,
62
+ 1222, 1230, 1241, 1251, 1259, 1267, 1274, 1281,
63
+ 1291, 1300, 1308, 1316, 1318, 1324, 1333, 1342,
64
+ 1351, 1363, 1374, 1383, 1392, 1400, 1410, 1419,
65
+ 1427, 1435, 1437, 1446, 1455, 1464, 1473, 1485,
66
+ 1496, 1505, 1514, 1522, 1532, 1541, 1549, 1557,
67
+ 1559, 1568, 1577, 1586, 1595, 1607, 1618, 1627,
68
+ 1636, 1644, 1654, 1663, 1671, 1679, 1681, 1690,
69
+ 1699, 1708, 1717, 1729, 1740, 1749, 1758, 1766,
70
+ 1776, 1785, 1793, 1801, 1803, 1812, 1821, 1830,
71
+ 1839, 1851, 1862, 1871, 1880, 1888, 1889, 1899,
72
+ 1908, 1916, 1924, 1926, 1935, 1944, 1953, 1962,
73
+ 1974, 1985, 1994, 2003, 2011, 2030, 2049, 2068,
74
+ 2087, 2106, 2123, 2126, 2131, 2132, 2134, 2138,
75
+ 2141, 2160, 2179, 2196, 2215, 2234, 2253, 2272,
76
+ 2291, 2310, 2329, 2348, 2367, 2384, 2409, 2428,
77
+ 2447, 2464, 2467, 2472, 2473, 2475, 2479, 2482,
78
+ 2485, 2488, 2491, 2494, 2497, 2500, 2503, 2506,
79
+ 2509, 2512, 2515, 2518, 2521, 2524, 2527, 2530,
80
+ 2533, 2536, 2539, 2542, 2545, 2548, 2551, 2554,
81
+ 2557, 2560, 2563, 2566, 2569, 2572, 2575, 2578,
82
+ 2581, 2584, 2587, 2590, 2593, 2596, 2599, 2602,
83
+ 2605, 2608, 2611, 2614, 2617, 2620, 2623, 2626,
84
+ 2627, 2646, 2665, 2684, 2703, 2722, 2741, 2760,
85
+ 2777, 2780, 2797, 2798, 2800, 2816, 2832, 2836,
86
+ 2837, 2839, 2842, 2859, 2860, 2862, 2878, 2879,
87
+ 2906, 2925, 2944, 2963, 2982, 3001, 3020, 3037,
88
+ 3040, 3057, 3058, 3060, 3076, 3091, 3110, 3129,
89
+ 3148, 3167, 3186, 3205, 3222, 3225, 3230, 3231,
90
+ 3233, 3237, 3240, 3243, 3244, 3263, 3282, 3301,
91
+ 3318, 3337, 3356, 3375, 3394, 3413, 3432, 3449,
92
+ 3452, 3457, 3458, 3460, 3464, 3467, 3470, 3473,
93
+ 3476, 3479, 3482, 3485, 3488, 3489, 3490, 3517,
94
+ 3523, 3524, 3525, 3531, 3537, 3543, 3549, 3555,
95
+ 3561, 3567, 3573, 3579, 3585, 3601, 3617, 3632,
96
+ 3648, 3664, 3680, 3696, 3712, 3728, 3743, 3759,
97
+ 3775, 3791, 3806
98
+ };
99
+
100
+ static const char _ws_http_request_parser_trans_keys[] = {
101
+ 33, 37, 39, 71, 79, 80, 126, 42,
102
+ 43, 45, 46, 48, 57, 65, 90, 95,
103
+ 122, 32, 33, 37, 39, 126, 42, 43,
104
+ 45, 46, 48, 57, 65, 90, 95, 122,
105
+ 47, 32, 35, 37, 59, 63, 127, 0,
106
+ 31, 72, 104, 84, 116, 84, 116, 80,
107
+ 112, 47, 48, 57, 46, 48, 57, 48,
108
+ 57, 13, 48, 57, 10, 13, 33, 37,
109
+ 39, 67, 72, 79, 83, 85, 99, 104,
110
+ 111, 115, 117, 126, 42, 43, 45, 46,
111
+ 48, 57, 65, 90, 95, 122, 10, 9,
112
+ 32, 33, 37, 39, 58, 126, 42, 43,
113
+ 45, 46, 48, 57, 65, 90, 95, 122,
114
+ 9, 32, 58, 9, 13, 32, 127, 0,
115
+ 31, 13, 127, 0, 8, 10, 31, 10,
116
+ 9, 13, 32, 33, 37, 39, 67, 72,
117
+ 79, 83, 85, 99, 104, 111, 115, 117,
118
+ 126, 42, 43, 45, 46, 48, 57, 65,
119
+ 90, 95, 122, 9, 32, 33, 37, 39,
120
+ 58, 79, 111, 126, 42, 43, 45, 46,
121
+ 48, 57, 65, 90, 95, 122, 9, 32,
122
+ 33, 37, 39, 58, 78, 110, 126, 42,
123
+ 43, 45, 46, 48, 57, 65, 90, 95,
124
+ 122, 9, 32, 33, 37, 39, 58, 78,
125
+ 84, 110, 116, 126, 42, 43, 45, 46,
126
+ 48, 57, 65, 90, 95, 122, 9, 32,
127
+ 33, 37, 39, 58, 69, 101, 126, 42,
128
+ 43, 45, 46, 48, 57, 65, 90, 95,
129
+ 122, 9, 32, 33, 37, 39, 58, 67,
130
+ 99, 126, 42, 43, 45, 46, 48, 57,
131
+ 65, 90, 95, 122, 9, 32, 33, 37,
132
+ 39, 58, 84, 116, 126, 42, 43, 45,
133
+ 46, 48, 57, 65, 90, 95, 122, 9,
134
+ 32, 33, 37, 39, 58, 73, 105, 126,
135
+ 42, 43, 45, 46, 48, 57, 65, 90,
136
+ 95, 122, 9, 32, 33, 37, 39, 58,
137
+ 79, 111, 126, 42, 43, 45, 46, 48,
138
+ 57, 65, 90, 95, 122, 9, 32, 33,
139
+ 37, 39, 58, 78, 110, 126, 42, 43,
140
+ 45, 46, 48, 57, 65, 90, 95, 122,
141
+ 9, 32, 33, 37, 39, 58, 126, 42,
142
+ 43, 45, 46, 48, 57, 65, 90, 95,
143
+ 122, 9, 32, 58, 9, 13, 32, 33,
144
+ 37, 39, 126, 42, 43, 45, 46, 48,
145
+ 57, 65, 90, 95, 122, 10, 9, 32,
146
+ 9, 32, 33, 37, 39, 126, 42, 43,
147
+ 45, 46, 48, 57, 65, 90, 95, 122,
148
+ 9, 13, 32, 33, 37, 39, 44, 126,
149
+ 42, 46, 48, 57, 65, 90, 95, 122,
150
+ 9, 13, 32, 44, 10, 9, 32, 9,
151
+ 32, 44, 9, 13, 32, 33, 37, 39,
152
+ 126, 42, 43, 45, 46, 48, 57, 65,
153
+ 90, 95, 122, 10, 9, 32, 9, 32,
154
+ 33, 37, 39, 126, 42, 43, 45, 46,
155
+ 48, 57, 65, 90, 95, 122, 10, 9,
156
+ 13, 32, 33, 37, 39, 67, 72, 79,
157
+ 83, 85, 99, 104, 111, 115, 117, 126,
158
+ 42, 43, 45, 46, 48, 57, 65, 90,
159
+ 95, 122, 9, 32, 33, 37, 39, 58,
160
+ 79, 111, 126, 42, 43, 45, 46, 48,
161
+ 57, 65, 90, 95, 122, 9, 32, 33,
162
+ 37, 39, 58, 83, 115, 126, 42, 43,
163
+ 45, 46, 48, 57, 65, 90, 95, 122,
164
+ 9, 32, 33, 37, 39, 58, 84, 116,
165
+ 126, 42, 43, 45, 46, 48, 57, 65,
166
+ 90, 95, 122, 9, 32, 33, 37, 39,
167
+ 58, 126, 42, 43, 45, 46, 48, 57,
168
+ 65, 90, 95, 122, 9, 32, 58, 9,
169
+ 13, 32, 48, 49, 50, 91, 51, 57,
170
+ 65, 90, 97, 122, 10, 9, 32, 9,
171
+ 32, 48, 49, 50, 91, 51, 57, 65,
172
+ 90, 97, 122, 45, 46, 95, 48, 57,
173
+ 65, 90, 97, 122, 45, 95, 48, 57,
174
+ 65, 90, 97, 122, 45, 46, 95, 48,
175
+ 57, 65, 90, 97, 122, 48, 57, 65,
176
+ 90, 97, 122, 13, 45, 46, 58, 95,
177
+ 48, 57, 65, 90, 97, 122, 45, 95,
178
+ 48, 57, 65, 90, 97, 122, 13, 58,
179
+ 48, 57, 65, 90, 97, 122, 48, 54,
180
+ 49, 53, 55, 57, 48, 49, 57, 48,
181
+ 49, 57, 49, 57, 13, 13, 48, 57,
182
+ 13, 48, 57, 13, 48, 57, 13, 48,
183
+ 57, 13, 53, 48, 52, 54, 57, 13,
184
+ 53, 48, 52, 54, 57, 13, 51, 48,
185
+ 50, 52, 57, 13, 48, 53, 48, 49,
186
+ 50, 51, 57, 65, 90, 97, 122, 45,
187
+ 46, 95, 48, 57, 65, 90, 97, 122,
188
+ 48, 49, 50, 51, 57, 65, 90, 97,
189
+ 122, 45, 46, 95, 48, 57, 65, 90,
190
+ 97, 122, 48, 49, 50, 51, 57, 65,
191
+ 90, 97, 122, 13, 45, 46, 58, 95,
192
+ 48, 57, 65, 90, 97, 122, 13, 45,
193
+ 46, 58, 95, 48, 57, 65, 90, 97,
194
+ 122, 13, 45, 46, 58, 95, 48, 57,
195
+ 65, 90, 97, 122, 13, 45, 46, 53,
196
+ 58, 95, 48, 52, 54, 57, 65, 90,
197
+ 97, 122, 13, 45, 46, 58, 95, 48,
198
+ 53, 54, 57, 65, 90, 97, 122, 45,
199
+ 46, 95, 48, 57, 65, 90, 97, 122,
200
+ 45, 46, 95, 48, 57, 65, 90, 97,
201
+ 122, 45, 46, 53, 95, 48, 52, 54,
202
+ 57, 65, 90, 97, 122, 45, 46, 95,
203
+ 48, 53, 54, 57, 65, 90, 97, 122,
204
+ 45, 46, 95, 48, 57, 65, 90, 97,
205
+ 122, 45, 46, 95, 48, 57, 65, 90,
206
+ 97, 122, 45, 46, 53, 95, 48, 52,
207
+ 54, 57, 65, 90, 97, 122, 45, 46,
208
+ 95, 48, 53, 54, 57, 65, 90, 97,
209
+ 122, 45, 46, 95, 48, 57, 65, 90,
210
+ 97, 122, 45, 46, 95, 48, 57, 65,
211
+ 90, 97, 122, 45, 46, 53, 95, 48,
212
+ 52, 54, 57, 65, 90, 97, 122, 45,
213
+ 46, 95, 48, 53, 54, 57, 65, 90,
214
+ 97, 122, 58, 48, 57, 65, 70, 97,
215
+ 102, 58, 48, 57, 65, 70, 97, 102,
216
+ 58, 48, 57, 65, 70, 97, 102, 58,
217
+ 48, 57, 65, 70, 97, 102, 58, 58,
218
+ 48, 57, 65, 70, 97, 102, 58, 48,
219
+ 57, 65, 70, 97, 102, 58, 48, 57,
220
+ 65, 70, 97, 102, 58, 48, 57, 65,
221
+ 70, 97, 102, 58, 58, 48, 57, 65,
222
+ 70, 97, 102, 58, 48, 57, 65, 70,
223
+ 97, 102, 58, 48, 57, 65, 70, 97,
224
+ 102, 58, 48, 57, 65, 70, 97, 102,
225
+ 58, 58, 48, 57, 65, 70, 97, 102,
226
+ 58, 48, 57, 65, 70, 97, 102, 58,
227
+ 48, 57, 65, 70, 97, 102, 58, 48,
228
+ 57, 65, 70, 97, 102, 58, 58, 48,
229
+ 57, 65, 70, 97, 102, 58, 48, 57,
230
+ 65, 70, 97, 102, 58, 48, 57, 65,
231
+ 70, 97, 102, 58, 48, 57, 65, 70,
232
+ 97, 102, 58, 58, 48, 57, 65, 70,
233
+ 97, 102, 58, 48, 57, 65, 70, 97,
234
+ 102, 58, 48, 57, 65, 70, 97, 102,
235
+ 58, 48, 57, 65, 70, 97, 102, 58,
236
+ 48, 49, 50, 58, 51, 57, 65, 70,
237
+ 97, 102, 46, 58, 48, 57, 65, 70,
238
+ 97, 102, 48, 49, 50, 51, 57, 46,
239
+ 48, 49, 50, 51, 57, 46, 48, 49,
240
+ 50, 51, 57, 93, 13, 58, 93, 48,
241
+ 57, 93, 48, 57, 53, 93, 48, 52,
242
+ 54, 57, 93, 48, 53, 46, 48, 57,
243
+ 46, 48, 57, 46, 53, 48, 52, 54,
244
+ 57, 46, 48, 53, 46, 48, 57, 46,
245
+ 48, 57, 46, 53, 48, 52, 54, 57,
246
+ 46, 48, 53, 58, 48, 57, 65, 70,
247
+ 97, 102, 58, 48, 57, 65, 70, 97,
248
+ 102, 58, 58, 48, 57, 65, 70, 97,
249
+ 102, 93, 48, 57, 65, 70, 97, 102,
250
+ 93, 48, 57, 65, 70, 97, 102, 93,
251
+ 48, 57, 65, 70, 97, 102, 46, 58,
252
+ 48, 57, 65, 70, 97, 102, 46, 58,
253
+ 48, 57, 65, 70, 97, 102, 46, 58,
254
+ 48, 57, 65, 70, 97, 102, 46, 53,
255
+ 58, 48, 52, 54, 57, 65, 70, 97,
256
+ 102, 46, 58, 48, 53, 54, 57, 65,
257
+ 70, 97, 102, 46, 58, 48, 57, 65,
258
+ 70, 97, 102, 46, 58, 48, 57, 65,
259
+ 70, 97, 102, 93, 48, 57, 65, 70,
260
+ 97, 102, 58, 48, 57, 65, 70, 97,
261
+ 102, 48, 49, 50, 93, 51, 57, 65,
262
+ 70, 97, 102, 46, 58, 93, 48, 57,
263
+ 65, 70, 97, 102, 58, 93, 48, 57,
264
+ 65, 70, 97, 102, 58, 93, 48, 57,
265
+ 65, 70, 97, 102, 58, 93, 48, 57,
266
+ 65, 70, 97, 102, 46, 58, 93, 48,
267
+ 57, 65, 70, 97, 102, 46, 58, 93,
268
+ 48, 57, 65, 70, 97, 102, 46, 58,
269
+ 93, 48, 57, 65, 70, 97, 102, 46,
270
+ 53, 58, 93, 48, 52, 54, 57, 65,
271
+ 70, 97, 102, 46, 58, 93, 48, 53,
272
+ 54, 57, 65, 70, 97, 102, 46, 58,
273
+ 93, 48, 57, 65, 70, 97, 102, 46,
274
+ 58, 93, 48, 57, 65, 70, 97, 102,
275
+ 58, 93, 48, 57, 65, 70, 97, 102,
276
+ 48, 49, 50, 93, 51, 57, 65, 70,
277
+ 97, 102, 46, 58, 93, 48, 57, 65,
278
+ 70, 97, 102, 58, 93, 48, 57, 65,
279
+ 70, 97, 102, 58, 93, 48, 57, 65,
280
+ 70, 97, 102, 58, 93, 48, 49, 50,
281
+ 51, 57, 65, 70, 97, 102, 46, 58,
282
+ 93, 48, 57, 65, 70, 97, 102, 46,
283
+ 58, 93, 48, 57, 65, 70, 97, 102,
284
+ 46, 58, 93, 48, 57, 65, 70, 97,
285
+ 102, 46, 53, 58, 93, 48, 52, 54,
286
+ 57, 65, 70, 97, 102, 46, 58, 93,
287
+ 48, 53, 54, 57, 65, 70, 97, 102,
288
+ 46, 58, 93, 48, 57, 65, 70, 97,
289
+ 102, 46, 58, 93, 48, 57, 65, 70,
290
+ 97, 102, 58, 93, 48, 57, 65, 70,
291
+ 97, 102, 48, 49, 50, 93, 51, 57,
292
+ 65, 70, 97, 102, 46, 58, 93, 48,
293
+ 57, 65, 70, 97, 102, 58, 93, 48,
294
+ 57, 65, 70, 97, 102, 58, 93, 48,
295
+ 57, 65, 70, 97, 102, 58, 93, 48,
296
+ 49, 50, 51, 57, 65, 70, 97, 102,
297
+ 46, 58, 93, 48, 57, 65, 70, 97,
298
+ 102, 46, 58, 93, 48, 57, 65, 70,
299
+ 97, 102, 46, 58, 93, 48, 57, 65,
300
+ 70, 97, 102, 46, 53, 58, 93, 48,
301
+ 52, 54, 57, 65, 70, 97, 102, 46,
302
+ 58, 93, 48, 53, 54, 57, 65, 70,
303
+ 97, 102, 46, 58, 93, 48, 57, 65,
304
+ 70, 97, 102, 46, 58, 93, 48, 57,
305
+ 65, 70, 97, 102, 58, 93, 48, 57,
306
+ 65, 70, 97, 102, 48, 49, 50, 93,
307
+ 51, 57, 65, 70, 97, 102, 46, 58,
308
+ 93, 48, 57, 65, 70, 97, 102, 58,
309
+ 93, 48, 57, 65, 70, 97, 102, 58,
310
+ 93, 48, 57, 65, 70, 97, 102, 58,
311
+ 93, 48, 49, 50, 51, 57, 65, 70,
312
+ 97, 102, 46, 58, 93, 48, 57, 65,
313
+ 70, 97, 102, 46, 58, 93, 48, 57,
314
+ 65, 70, 97, 102, 46, 58, 93, 48,
315
+ 57, 65, 70, 97, 102, 46, 53, 58,
316
+ 93, 48, 52, 54, 57, 65, 70, 97,
317
+ 102, 46, 58, 93, 48, 53, 54, 57,
318
+ 65, 70, 97, 102, 46, 58, 93, 48,
319
+ 57, 65, 70, 97, 102, 46, 58, 93,
320
+ 48, 57, 65, 70, 97, 102, 58, 93,
321
+ 48, 57, 65, 70, 97, 102, 48, 49,
322
+ 50, 93, 51, 57, 65, 70, 97, 102,
323
+ 46, 58, 93, 48, 57, 65, 70, 97,
324
+ 102, 58, 93, 48, 57, 65, 70, 97,
325
+ 102, 58, 93, 48, 57, 65, 70, 97,
326
+ 102, 58, 93, 48, 49, 50, 51, 57,
327
+ 65, 70, 97, 102, 46, 58, 93, 48,
328
+ 57, 65, 70, 97, 102, 46, 58, 93,
329
+ 48, 57, 65, 70, 97, 102, 46, 58,
330
+ 93, 48, 57, 65, 70, 97, 102, 46,
331
+ 53, 58, 93, 48, 52, 54, 57, 65,
332
+ 70, 97, 102, 46, 58, 93, 48, 53,
333
+ 54, 57, 65, 70, 97, 102, 46, 58,
334
+ 93, 48, 57, 65, 70, 97, 102, 46,
335
+ 58, 93, 48, 57, 65, 70, 97, 102,
336
+ 58, 93, 48, 57, 65, 70, 97, 102,
337
+ 58, 48, 49, 50, 93, 51, 57, 65,
338
+ 70, 97, 102, 46, 58, 93, 48, 57,
339
+ 65, 70, 97, 102, 58, 93, 48, 57,
340
+ 65, 70, 97, 102, 58, 93, 48, 57,
341
+ 65, 70, 97, 102, 58, 93, 48, 49,
342
+ 50, 51, 57, 65, 70, 97, 102, 46,
343
+ 58, 93, 48, 57, 65, 70, 97, 102,
344
+ 46, 58, 93, 48, 57, 65, 70, 97,
345
+ 102, 46, 58, 93, 48, 57, 65, 70,
346
+ 97, 102, 46, 53, 58, 93, 48, 52,
347
+ 54, 57, 65, 70, 97, 102, 46, 58,
348
+ 93, 48, 53, 54, 57, 65, 70, 97,
349
+ 102, 46, 58, 93, 48, 57, 65, 70,
350
+ 97, 102, 46, 58, 93, 48, 57, 65,
351
+ 70, 97, 102, 58, 93, 48, 57, 65,
352
+ 70, 97, 102, 9, 32, 33, 37, 39,
353
+ 58, 82, 114, 126, 42, 43, 45, 46,
354
+ 48, 57, 65, 90, 95, 122, 9, 32,
355
+ 33, 37, 39, 58, 73, 105, 126, 42,
356
+ 43, 45, 46, 48, 57, 65, 90, 95,
357
+ 122, 9, 32, 33, 37, 39, 58, 71,
358
+ 103, 126, 42, 43, 45, 46, 48, 57,
359
+ 65, 90, 95, 122, 9, 32, 33, 37,
360
+ 39, 58, 73, 105, 126, 42, 43, 45,
361
+ 46, 48, 57, 65, 90, 95, 122, 9,
362
+ 32, 33, 37, 39, 58, 78, 110, 126,
363
+ 42, 43, 45, 46, 48, 57, 65, 90,
364
+ 95, 122, 9, 32, 33, 37, 39, 58,
365
+ 126, 42, 43, 45, 46, 48, 57, 65,
366
+ 90, 95, 122, 9, 32, 58, 9, 13,
367
+ 32, 33, 126, 10, 9, 32, 9, 32,
368
+ 33, 126, 13, 33, 126, 9, 32, 33,
369
+ 37, 39, 58, 69, 101, 126, 42, 43,
370
+ 45, 46, 48, 57, 65, 90, 95, 122,
371
+ 9, 32, 33, 37, 39, 58, 67, 99,
372
+ 126, 42, 43, 45, 46, 48, 57, 65,
373
+ 90, 95, 122, 9, 32, 33, 37, 39,
374
+ 45, 46, 58, 126, 42, 43, 48, 57,
375
+ 65, 90, 95, 122, 9, 32, 33, 37,
376
+ 39, 58, 87, 119, 126, 42, 43, 45,
377
+ 46, 48, 57, 65, 90, 95, 122, 9,
378
+ 32, 33, 37, 39, 58, 69, 101, 126,
379
+ 42, 43, 45, 46, 48, 57, 65, 90,
380
+ 95, 122, 9, 32, 33, 37, 39, 58,
381
+ 66, 98, 126, 42, 43, 45, 46, 48,
382
+ 57, 65, 90, 95, 122, 9, 32, 33,
383
+ 37, 39, 58, 83, 115, 126, 42, 43,
384
+ 45, 46, 48, 57, 65, 90, 95, 122,
385
+ 9, 32, 33, 37, 39, 58, 79, 111,
386
+ 126, 42, 43, 45, 46, 48, 57, 65,
387
+ 90, 95, 122, 9, 32, 33, 37, 39,
388
+ 58, 67, 99, 126, 42, 43, 45, 46,
389
+ 48, 57, 65, 90, 95, 122, 9, 32,
390
+ 33, 37, 39, 58, 75, 107, 126, 42,
391
+ 43, 45, 46, 48, 57, 65, 90, 95,
392
+ 122, 9, 32, 33, 37, 39, 58, 69,
393
+ 101, 126, 42, 43, 45, 46, 48, 57,
394
+ 65, 90, 95, 122, 9, 32, 33, 37,
395
+ 39, 58, 84, 116, 126, 42, 43, 45,
396
+ 46, 48, 57, 65, 90, 95, 122, 9,
397
+ 32, 33, 37, 39, 45, 46, 58, 126,
398
+ 42, 43, 48, 57, 65, 90, 95, 122,
399
+ 9, 32, 33, 37, 39, 58, 75, 79,
400
+ 80, 86, 107, 111, 112, 118, 126, 42,
401
+ 43, 45, 46, 48, 57, 65, 90, 95,
402
+ 122, 9, 32, 33, 37, 39, 58, 69,
403
+ 101, 126, 42, 43, 45, 46, 48, 57,
404
+ 65, 90, 95, 122, 9, 32, 33, 37,
405
+ 39, 58, 89, 121, 126, 42, 43, 45,
406
+ 46, 48, 57, 65, 90, 95, 122, 9,
407
+ 32, 33, 37, 39, 58, 126, 42, 43,
408
+ 45, 46, 48, 57, 65, 90, 95, 122,
409
+ 9, 32, 58, 9, 13, 32, 33, 126,
410
+ 10, 9, 32, 9, 32, 33, 126, 13,
411
+ 33, 126, 13, 33, 126, 13, 33, 126,
412
+ 13, 33, 126, 13, 33, 126, 13, 33,
413
+ 126, 13, 33, 126, 13, 33, 126, 13,
414
+ 33, 126, 13, 33, 126, 13, 33, 126,
415
+ 13, 33, 126, 13, 33, 126, 13, 33,
416
+ 126, 13, 33, 126, 13, 33, 126, 13,
417
+ 33, 126, 13, 33, 126, 13, 33, 126,
418
+ 13, 33, 126, 13, 33, 126, 13, 33,
419
+ 126, 13, 33, 126, 13, 33, 126, 13,
420
+ 33, 126, 13, 33, 126, 13, 33, 126,
421
+ 13, 33, 126, 13, 33, 126, 13, 33,
422
+ 126, 13, 33, 126, 13, 33, 126, 13,
423
+ 33, 126, 13, 33, 126, 13, 33, 126,
424
+ 13, 33, 126, 13, 33, 126, 13, 33,
425
+ 126, 13, 33, 126, 13, 33, 126, 13,
426
+ 33, 126, 13, 33, 126, 13, 33, 126,
427
+ 13, 33, 126, 13, 33, 126, 13, 33,
428
+ 126, 13, 33, 126, 13, 33, 126, 13,
429
+ 33, 126, 13, 9, 32, 33, 37, 39,
430
+ 58, 82, 114, 126, 42, 43, 45, 46,
431
+ 48, 57, 65, 90, 95, 122, 9, 32,
432
+ 33, 37, 39, 58, 79, 111, 126, 42,
433
+ 43, 45, 46, 48, 57, 65, 90, 95,
434
+ 122, 9, 32, 33, 37, 39, 58, 84,
435
+ 116, 126, 42, 43, 45, 46, 48, 57,
436
+ 65, 90, 95, 122, 9, 32, 33, 37,
437
+ 39, 58, 79, 111, 126, 42, 43, 45,
438
+ 46, 48, 57, 65, 90, 95, 122, 9,
439
+ 32, 33, 37, 39, 58, 67, 99, 126,
440
+ 42, 43, 45, 46, 48, 57, 65, 90,
441
+ 95, 122, 9, 32, 33, 37, 39, 58,
442
+ 79, 111, 126, 42, 43, 45, 46, 48,
443
+ 57, 65, 90, 95, 122, 9, 32, 33,
444
+ 37, 39, 58, 76, 108, 126, 42, 43,
445
+ 45, 46, 48, 57, 65, 90, 95, 122,
446
+ 9, 32, 33, 37, 39, 58, 126, 42,
447
+ 43, 45, 46, 48, 57, 65, 90, 95,
448
+ 122, 9, 32, 58, 9, 13, 32, 33,
449
+ 37, 39, 126, 42, 43, 45, 46, 48,
450
+ 57, 65, 90, 95, 122, 10, 9, 32,
451
+ 9, 32, 33, 37, 39, 126, 42, 43,
452
+ 45, 46, 48, 57, 65, 90, 95, 122,
453
+ 9, 13, 32, 33, 37, 39, 44, 126,
454
+ 42, 46, 48, 57, 65, 90, 95, 122,
455
+ 9, 13, 32, 44, 10, 9, 32, 9,
456
+ 32, 44, 9, 13, 32, 33, 37, 39,
457
+ 126, 42, 43, 45, 46, 48, 57, 65,
458
+ 90, 95, 122, 10, 9, 32, 9, 32,
459
+ 33, 37, 39, 126, 42, 43, 45, 46,
460
+ 48, 57, 65, 90, 95, 122, 10, 9,
461
+ 13, 32, 33, 37, 39, 67, 72, 79,
462
+ 83, 85, 99, 104, 111, 115, 117, 126,
463
+ 42, 43, 45, 46, 48, 57, 65, 90,
464
+ 95, 122, 9, 32, 33, 37, 39, 58,
465
+ 80, 112, 126, 42, 43, 45, 46, 48,
466
+ 57, 65, 90, 95, 122, 9, 32, 33,
467
+ 37, 39, 58, 71, 103, 126, 42, 43,
468
+ 45, 46, 48, 57, 65, 90, 95, 122,
469
+ 9, 32, 33, 37, 39, 58, 82, 114,
470
+ 126, 42, 43, 45, 46, 48, 57, 65,
471
+ 90, 95, 122, 9, 32, 33, 37, 39,
472
+ 58, 65, 97, 126, 42, 43, 45, 46,
473
+ 48, 57, 66, 90, 95, 122, 9, 32,
474
+ 33, 37, 39, 58, 68, 100, 126, 42,
475
+ 43, 45, 46, 48, 57, 65, 90, 95,
476
+ 122, 9, 32, 33, 37, 39, 58, 69,
477
+ 101, 126, 42, 43, 45, 46, 48, 57,
478
+ 65, 90, 95, 122, 9, 32, 33, 37,
479
+ 39, 58, 126, 42, 43, 45, 46, 48,
480
+ 57, 65, 90, 95, 122, 9, 32, 58,
481
+ 9, 13, 32, 33, 37, 39, 126, 42,
482
+ 43, 45, 46, 48, 57, 65, 90, 95,
483
+ 122, 10, 9, 32, 9, 32, 33, 37,
484
+ 39, 126, 42, 43, 45, 46, 48, 57,
485
+ 65, 90, 95, 122, 13, 33, 37, 39,
486
+ 126, 42, 43, 45, 46, 48, 57, 65,
487
+ 90, 95, 122, 9, 32, 33, 37, 39,
488
+ 58, 69, 101, 126, 42, 43, 45, 46,
489
+ 48, 57, 65, 90, 95, 122, 9, 32,
490
+ 33, 37, 39, 58, 82, 114, 126, 42,
491
+ 43, 45, 46, 48, 57, 65, 90, 95,
492
+ 122, 9, 32, 33, 37, 39, 58, 83,
493
+ 115, 126, 42, 43, 45, 46, 48, 57,
494
+ 65, 90, 95, 122, 9, 32, 33, 37,
495
+ 39, 58, 73, 105, 126, 42, 43, 45,
496
+ 46, 48, 57, 65, 90, 95, 122, 9,
497
+ 32, 33, 37, 39, 58, 79, 111, 126,
498
+ 42, 43, 45, 46, 48, 57, 65, 90,
499
+ 95, 122, 9, 32, 33, 37, 39, 58,
500
+ 78, 110, 126, 42, 43, 45, 46, 48,
501
+ 57, 65, 90, 95, 122, 9, 32, 33,
502
+ 37, 39, 58, 126, 42, 43, 45, 46,
503
+ 48, 57, 65, 90, 95, 122, 9, 32,
504
+ 58, 9, 13, 32, 48, 57, 10, 9,
505
+ 32, 9, 32, 48, 57, 13, 48, 57,
506
+ 13, 48, 57, 13, 9, 32, 33, 37,
507
+ 39, 58, 69, 101, 126, 42, 43, 45,
508
+ 46, 48, 57, 65, 90, 95, 122, 9,
509
+ 32, 33, 37, 39, 58, 78, 110, 126,
510
+ 42, 43, 45, 46, 48, 57, 65, 90,
511
+ 95, 122, 9, 32, 33, 37, 39, 58,
512
+ 84, 116, 126, 42, 43, 45, 46, 48,
513
+ 57, 65, 90, 95, 122, 9, 32, 33,
514
+ 37, 39, 45, 46, 58, 126, 42, 43,
515
+ 48, 57, 65, 90, 95, 122, 9, 32,
516
+ 33, 37, 39, 58, 76, 108, 126, 42,
517
+ 43, 45, 46, 48, 57, 65, 90, 95,
518
+ 122, 9, 32, 33, 37, 39, 58, 69,
519
+ 101, 126, 42, 43, 45, 46, 48, 57,
520
+ 65, 90, 95, 122, 9, 32, 33, 37,
521
+ 39, 58, 78, 110, 126, 42, 43, 45,
522
+ 46, 48, 57, 65, 90, 95, 122, 9,
523
+ 32, 33, 37, 39, 58, 71, 103, 126,
524
+ 42, 43, 45, 46, 48, 57, 65, 90,
525
+ 95, 122, 9, 32, 33, 37, 39, 58,
526
+ 84, 116, 126, 42, 43, 45, 46, 48,
527
+ 57, 65, 90, 95, 122, 9, 32, 33,
528
+ 37, 39, 58, 72, 104, 126, 42, 43,
529
+ 45, 46, 48, 57, 65, 90, 95, 122,
530
+ 9, 32, 33, 37, 39, 58, 126, 42,
531
+ 43, 45, 46, 48, 57, 65, 90, 95,
532
+ 122, 9, 32, 58, 9, 13, 32, 48,
533
+ 57, 10, 9, 32, 9, 32, 48, 57,
534
+ 13, 48, 57, 13, 48, 57, 13, 48,
535
+ 57, 13, 48, 57, 13, 48, 57, 13,
536
+ 48, 57, 13, 48, 57, 13, 48, 57,
537
+ 13, 10, 9, 13, 32, 33, 37, 39,
538
+ 67, 72, 79, 83, 85, 99, 104, 111,
539
+ 115, 117, 126, 42, 43, 45, 46, 48,
540
+ 57, 65, 90, 95, 122, 9, 13, 32,
541
+ 127, 0, 31, 13, 46, 32, 35, 37,
542
+ 127, 0, 31, 32, 35, 37, 127, 0,
543
+ 31, 48, 57, 65, 70, 97, 102, 48,
544
+ 57, 65, 70, 97, 102, 48, 57, 65,
545
+ 70, 97, 102, 48, 57, 65, 70, 97,
546
+ 102, 32, 35, 37, 127, 0, 31, 32,
547
+ 35, 37, 127, 0, 31, 48, 57, 65,
548
+ 70, 97, 102, 48, 57, 65, 70, 97,
549
+ 102, 32, 33, 37, 39, 69, 126, 42,
550
+ 43, 45, 46, 48, 57, 65, 90, 95,
551
+ 122, 32, 33, 37, 39, 84, 126, 42,
552
+ 43, 45, 46, 48, 57, 65, 90, 95,
553
+ 122, 32, 33, 37, 39, 126, 42, 43,
554
+ 45, 46, 48, 57, 65, 90, 95, 122,
555
+ 32, 33, 37, 39, 80, 126, 42, 43,
556
+ 45, 46, 48, 57, 65, 90, 95, 122,
557
+ 32, 33, 37, 39, 84, 126, 42, 43,
558
+ 45, 46, 48, 57, 65, 90, 95, 122,
559
+ 32, 33, 37, 39, 73, 126, 42, 43,
560
+ 45, 46, 48, 57, 65, 90, 95, 122,
561
+ 32, 33, 37, 39, 79, 126, 42, 43,
562
+ 45, 46, 48, 57, 65, 90, 95, 122,
563
+ 32, 33, 37, 39, 78, 126, 42, 43,
564
+ 45, 46, 48, 57, 65, 90, 95, 122,
565
+ 32, 33, 37, 39, 83, 126, 42, 43,
566
+ 45, 46, 48, 57, 65, 90, 95, 122,
567
+ 32, 33, 37, 39, 126, 42, 43, 45,
568
+ 46, 48, 57, 65, 90, 95, 122, 32,
569
+ 33, 37, 39, 79, 126, 42, 43, 45,
570
+ 46, 48, 57, 65, 90, 95, 122, 32,
571
+ 33, 37, 39, 83, 126, 42, 43, 45,
572
+ 46, 48, 57, 65, 90, 95, 122, 32,
573
+ 33, 37, 39, 84, 126, 42, 43, 45,
574
+ 46, 48, 57, 65, 90, 95, 122, 32,
575
+ 33, 37, 39, 126, 42, 43, 45, 46,
576
+ 48, 57, 65, 90, 95, 122, 0
577
+ };
578
+
579
+ static const char _ws_http_request_parser_single_lengths[] = {
580
+ 0, 7, 5, 1, 6, 2, 2, 2,
581
+ 2, 1, 0, 1, 0, 1, 1, 15,
582
+ 1, 7, 3, 4, 2, 1, 17, 9,
583
+ 9, 11, 9, 9, 9, 9, 9, 9,
584
+ 7, 3, 7, 1, 2, 6, 8, 4,
585
+ 1, 2, 3, 7, 1, 2, 6, 1,
586
+ 17, 9, 9, 9, 7, 3, 7, 1,
587
+ 2, 6, 3, 2, 3, 0, 5, 2,
588
+ 2, 2, 1, 1, 0, 1, 1, 1,
589
+ 1, 1, 2, 2, 2, 1, 3, 3,
590
+ 3, 3, 3, 5, 5, 5, 6, 5,
591
+ 3, 3, 4, 3, 3, 3, 4, 3,
592
+ 3, 3, 4, 3, 1, 1, 1, 1,
593
+ 1, 1, 1, 1, 1, 1, 1, 1,
594
+ 1, 1, 1, 1, 1, 1, 1, 1,
595
+ 1, 1, 1, 1, 1, 1, 1, 1,
596
+ 1, 1, 4, 2, 3, 1, 3, 1,
597
+ 3, 1, 2, 1, 1, 2, 1, 1,
598
+ 1, 2, 1, 1, 1, 2, 1, 1,
599
+ 1, 1, 1, 1, 1, 1, 2, 2,
600
+ 2, 3, 2, 2, 2, 1, 1, 4,
601
+ 3, 2, 2, 2, 0, 3, 3, 3,
602
+ 4, 3, 3, 3, 2, 4, 3, 2,
603
+ 2, 2, 3, 3, 3, 3, 4, 3,
604
+ 3, 3, 2, 4, 3, 2, 2, 2,
605
+ 3, 3, 3, 3, 4, 3, 3, 3,
606
+ 2, 4, 3, 2, 2, 2, 3, 3,
607
+ 3, 3, 4, 3, 3, 3, 2, 4,
608
+ 3, 2, 2, 2, 3, 3, 3, 3,
609
+ 4, 3, 3, 3, 2, 1, 4, 3,
610
+ 2, 2, 2, 3, 3, 3, 3, 4,
611
+ 3, 3, 3, 2, 9, 9, 9, 9,
612
+ 9, 7, 3, 3, 1, 2, 2, 1,
613
+ 9, 9, 9, 9, 9, 9, 9, 9,
614
+ 9, 9, 9, 9, 9, 15, 9, 9,
615
+ 7, 3, 3, 1, 2, 2, 1, 1,
616
+ 1, 1, 1, 1, 1, 1, 1, 1,
617
+ 1, 1, 1, 1, 1, 1, 1, 1,
618
+ 1, 1, 1, 1, 1, 1, 1, 1,
619
+ 1, 1, 1, 1, 1, 1, 1, 1,
620
+ 1, 1, 1, 1, 1, 1, 1, 1,
621
+ 1, 1, 1, 1, 1, 1, 1, 1,
622
+ 9, 9, 9, 9, 9, 9, 9, 7,
623
+ 3, 7, 1, 2, 6, 8, 4, 1,
624
+ 2, 3, 7, 1, 2, 6, 1, 17,
625
+ 9, 9, 9, 9, 9, 9, 7, 3,
626
+ 7, 1, 2, 6, 5, 9, 9, 9,
627
+ 9, 9, 9, 7, 3, 3, 1, 2,
628
+ 2, 1, 1, 1, 9, 9, 9, 9,
629
+ 9, 9, 9, 9, 9, 9, 7, 3,
630
+ 3, 1, 2, 2, 1, 1, 1, 1,
631
+ 1, 1, 1, 1, 1, 1, 17, 4,
632
+ 1, 1, 4, 4, 0, 0, 0, 0,
633
+ 4, 4, 0, 0, 6, 6, 5, 6,
634
+ 6, 6, 6, 6, 6, 5, 6, 6,
635
+ 6, 5, 0
636
+ };
637
+
638
+ static const char _ws_http_request_parser_range_lengths[] = {
639
+ 0, 5, 5, 0, 1, 0, 0, 0,
640
+ 0, 0, 1, 1, 1, 1, 0, 5,
641
+ 0, 5, 0, 1, 2, 0, 5, 5,
642
+ 5, 5, 5, 5, 5, 5, 5, 5,
643
+ 5, 0, 5, 0, 0, 5, 4, 0,
644
+ 0, 0, 0, 5, 0, 0, 5, 0,
645
+ 5, 5, 5, 5, 5, 0, 3, 0,
646
+ 0, 3, 3, 3, 3, 3, 3, 3,
647
+ 3, 2, 1, 1, 1, 0, 1, 1,
648
+ 1, 1, 2, 2, 2, 1, 3, 3,
649
+ 3, 3, 3, 3, 3, 3, 4, 4,
650
+ 3, 3, 4, 4, 3, 3, 4, 4,
651
+ 3, 3, 4, 4, 3, 3, 3, 3,
652
+ 0, 3, 3, 3, 3, 0, 3, 3,
653
+ 3, 3, 0, 3, 3, 3, 3, 0,
654
+ 3, 3, 3, 3, 0, 3, 3, 3,
655
+ 3, 0, 3, 3, 1, 0, 1, 0,
656
+ 1, 0, 0, 1, 1, 2, 1, 1,
657
+ 1, 2, 1, 1, 1, 2, 1, 3,
658
+ 3, 0, 3, 3, 3, 3, 3, 3,
659
+ 3, 4, 4, 3, 3, 3, 3, 3,
660
+ 3, 3, 3, 0, 3, 3, 3, 3,
661
+ 4, 4, 3, 3, 3, 3, 3, 3,
662
+ 3, 0, 3, 3, 3, 3, 4, 4,
663
+ 3, 3, 3, 3, 3, 3, 3, 0,
664
+ 3, 3, 3, 3, 4, 4, 3, 3,
665
+ 3, 3, 3, 3, 3, 0, 3, 3,
666
+ 3, 3, 4, 4, 3, 3, 3, 3,
667
+ 3, 3, 3, 0, 3, 3, 3, 3,
668
+ 4, 4, 3, 3, 3, 0, 3, 3,
669
+ 3, 3, 0, 3, 3, 3, 3, 4,
670
+ 4, 3, 3, 3, 5, 5, 5, 5,
671
+ 5, 5, 0, 1, 0, 0, 1, 1,
672
+ 5, 5, 4, 5, 5, 5, 5, 5,
673
+ 5, 5, 5, 5, 4, 5, 5, 5,
674
+ 5, 0, 1, 0, 0, 1, 1, 1,
675
+ 1, 1, 1, 1, 1, 1, 1, 1,
676
+ 1, 1, 1, 1, 1, 1, 1, 1,
677
+ 1, 1, 1, 1, 1, 1, 1, 1,
678
+ 1, 1, 1, 1, 1, 1, 1, 1,
679
+ 1, 1, 1, 1, 1, 1, 1, 1,
680
+ 1, 1, 1, 1, 1, 1, 1, 0,
681
+ 5, 5, 5, 5, 5, 5, 5, 5,
682
+ 0, 5, 0, 0, 5, 4, 0, 0,
683
+ 0, 0, 5, 0, 0, 5, 0, 5,
684
+ 5, 5, 5, 5, 5, 5, 5, 0,
685
+ 5, 0, 0, 5, 5, 5, 5, 5,
686
+ 5, 5, 5, 5, 0, 1, 0, 0,
687
+ 1, 1, 1, 0, 5, 5, 5, 4,
688
+ 5, 5, 5, 5, 5, 5, 5, 0,
689
+ 1, 0, 0, 1, 1, 1, 1, 1,
690
+ 1, 1, 1, 1, 0, 0, 5, 1,
691
+ 0, 0, 1, 1, 3, 3, 3, 3,
692
+ 1, 1, 3, 3, 5, 5, 5, 5,
693
+ 5, 5, 5, 5, 5, 5, 5, 5,
694
+ 5, 5, 0
695
+ };
696
+
697
+ static const short _ws_http_request_parser_index_offsets[] = {
698
+ 0, 0, 13, 24, 26, 34, 37, 40,
699
+ 43, 46, 48, 50, 53, 55, 58, 60,
700
+ 81, 83, 96, 100, 106, 111, 113, 136,
701
+ 151, 166, 183, 198, 213, 228, 243, 258,
702
+ 273, 286, 290, 303, 305, 308, 320, 333,
703
+ 338, 340, 343, 347, 360, 362, 365, 377,
704
+ 379, 402, 417, 432, 447, 460, 464, 475,
705
+ 477, 480, 490, 497, 503, 510, 514, 523,
706
+ 529, 535, 540, 543, 546, 548, 550, 553,
707
+ 556, 559, 562, 567, 572, 577, 580, 587,
708
+ 594, 601, 608, 615, 624, 633, 642, 653,
709
+ 663, 670, 677, 686, 694, 701, 708, 717,
710
+ 725, 732, 739, 748, 756, 761, 766, 771,
711
+ 776, 778, 783, 788, 793, 798, 800, 805,
712
+ 810, 815, 820, 822, 827, 832, 837, 842,
713
+ 844, 849, 854, 859, 864, 866, 871, 876,
714
+ 881, 886, 888, 896, 902, 907, 909, 914,
715
+ 916, 921, 923, 926, 929, 932, 937, 940,
716
+ 943, 946, 951, 954, 957, 960, 965, 968,
717
+ 973, 978, 980, 985, 990, 995, 1000, 1006,
718
+ 1012, 1018, 1026, 1033, 1039, 1045, 1050, 1055,
719
+ 1063, 1070, 1076, 1082, 1085, 1089, 1096, 1103,
720
+ 1110, 1119, 1127, 1134, 1141, 1147, 1155, 1162,
721
+ 1168, 1174, 1177, 1184, 1191, 1198, 1205, 1214,
722
+ 1222, 1229, 1236, 1242, 1250, 1257, 1263, 1269,
723
+ 1272, 1279, 1286, 1293, 1300, 1309, 1317, 1324,
724
+ 1331, 1337, 1345, 1352, 1358, 1364, 1367, 1374,
725
+ 1381, 1388, 1395, 1404, 1412, 1419, 1426, 1432,
726
+ 1440, 1447, 1453, 1459, 1462, 1469, 1476, 1483,
727
+ 1490, 1499, 1507, 1514, 1521, 1527, 1529, 1537,
728
+ 1544, 1550, 1556, 1559, 1566, 1573, 1580, 1587,
729
+ 1596, 1604, 1611, 1618, 1624, 1639, 1654, 1669,
730
+ 1684, 1699, 1712, 1716, 1721, 1723, 1726, 1730,
731
+ 1733, 1748, 1763, 1777, 1792, 1807, 1822, 1837,
732
+ 1852, 1867, 1882, 1897, 1912, 1926, 1947, 1962,
733
+ 1977, 1990, 1994, 1999, 2001, 2004, 2008, 2011,
734
+ 2014, 2017, 2020, 2023, 2026, 2029, 2032, 2035,
735
+ 2038, 2041, 2044, 2047, 2050, 2053, 2056, 2059,
736
+ 2062, 2065, 2068, 2071, 2074, 2077, 2080, 2083,
737
+ 2086, 2089, 2092, 2095, 2098, 2101, 2104, 2107,
738
+ 2110, 2113, 2116, 2119, 2122, 2125, 2128, 2131,
739
+ 2134, 2137, 2140, 2143, 2146, 2149, 2152, 2155,
740
+ 2157, 2172, 2187, 2202, 2217, 2232, 2247, 2262,
741
+ 2275, 2279, 2292, 2294, 2297, 2309, 2322, 2327,
742
+ 2329, 2332, 2336, 2349, 2351, 2354, 2366, 2368,
743
+ 2391, 2406, 2421, 2436, 2451, 2466, 2481, 2494,
744
+ 2498, 2511, 2513, 2516, 2528, 2539, 2554, 2569,
745
+ 2584, 2599, 2614, 2629, 2642, 2646, 2651, 2653,
746
+ 2656, 2660, 2663, 2666, 2668, 2683, 2698, 2713,
747
+ 2727, 2742, 2757, 2772, 2787, 2802, 2817, 2830,
748
+ 2834, 2839, 2841, 2844, 2848, 2851, 2854, 2857,
749
+ 2860, 2863, 2866, 2869, 2872, 2874, 2876, 2899,
750
+ 2905, 2907, 2909, 2915, 2921, 2925, 2929, 2933,
751
+ 2937, 2943, 2949, 2953, 2957, 2969, 2981, 2992,
752
+ 3004, 3016, 3028, 3040, 3052, 3064, 3075, 3087,
753
+ 3099, 3111, 3122
754
+ };
755
+
756
+ static const short _ws_http_request_parser_indicies[] = {
757
+ 0, 0, 0, 2, 3, 4, 0, 0,
758
+ 0, 0, 0, 0, 1, 5, 6, 6,
759
+ 6, 6, 6, 6, 6, 6, 6, 1,
760
+ 7, 1, 9, 10, 11, 1, 12, 1,
761
+ 1, 8, 13, 13, 1, 14, 14, 1,
762
+ 15, 15, 1, 16, 16, 1, 17, 1,
763
+ 18, 1, 19, 20, 1, 21, 1, 22,
764
+ 23, 1, 24, 1, 25, 26, 26, 26,
765
+ 27, 28, 29, 30, 31, 27, 28, 29,
766
+ 30, 31, 26, 26, 26, 26, 26, 26,
767
+ 1, 32, 1, 33, 33, 34, 34, 34,
768
+ 35, 34, 34, 34, 34, 34, 34, 1,
769
+ 36, 36, 37, 1, 39, 40, 39, 1,
770
+ 1, 38, 42, 1, 1, 1, 41, 43,
771
+ 1, 41, 25, 41, 26, 26, 26, 27,
772
+ 28, 29, 30, 31, 27, 28, 29, 30,
773
+ 31, 26, 26, 26, 26, 26, 26, 1,
774
+ 33, 33, 34, 34, 34, 35, 44, 44,
775
+ 34, 34, 34, 34, 34, 34, 1, 33,
776
+ 33, 34, 34, 34, 35, 45, 45, 34,
777
+ 34, 34, 34, 34, 34, 1, 33, 33,
778
+ 34, 34, 34, 35, 46, 47, 46, 47,
779
+ 34, 34, 34, 34, 34, 34, 1, 33,
780
+ 33, 34, 34, 34, 35, 48, 48, 34,
781
+ 34, 34, 34, 34, 34, 1, 33, 33,
782
+ 34, 34, 34, 35, 49, 49, 34, 34,
783
+ 34, 34, 34, 34, 1, 33, 33, 34,
784
+ 34, 34, 35, 50, 50, 34, 34, 34,
785
+ 34, 34, 34, 1, 33, 33, 34, 34,
786
+ 34, 35, 51, 51, 34, 34, 34, 34,
787
+ 34, 34, 1, 33, 33, 34, 34, 34,
788
+ 35, 52, 52, 34, 34, 34, 34, 34,
789
+ 34, 1, 33, 33, 34, 34, 34, 35,
790
+ 53, 53, 34, 34, 34, 34, 34, 34,
791
+ 1, 54, 54, 34, 34, 34, 55, 34,
792
+ 34, 34, 34, 34, 34, 1, 56, 56,
793
+ 57, 1, 57, 58, 57, 59, 59, 59,
794
+ 59, 59, 59, 59, 59, 59, 1, 60,
795
+ 1, 61, 61, 1, 61, 61, 59, 59,
796
+ 59, 59, 59, 59, 59, 59, 59, 1,
797
+ 62, 63, 62, 64, 64, 64, 65, 64,
798
+ 64, 64, 64, 64, 1, 66, 67, 66,
799
+ 68, 1, 69, 1, 70, 70, 1, 70,
800
+ 70, 68, 1, 68, 71, 68, 72, 72,
801
+ 72, 72, 72, 72, 72, 72, 72, 1,
802
+ 73, 1, 74, 74, 1, 74, 74, 72,
803
+ 72, 72, 72, 72, 72, 72, 72, 72,
804
+ 1, 75, 1, 70, 25, 70, 26, 26,
805
+ 26, 27, 28, 29, 30, 31, 27, 28,
806
+ 29, 30, 31, 26, 26, 26, 26, 26,
807
+ 26, 1, 33, 33, 34, 34, 34, 35,
808
+ 76, 76, 34, 34, 34, 34, 34, 34,
809
+ 1, 33, 33, 34, 34, 34, 35, 77,
810
+ 77, 34, 34, 34, 34, 34, 34, 1,
811
+ 33, 33, 34, 34, 34, 35, 78, 78,
812
+ 34, 34, 34, 34, 34, 34, 1, 79,
813
+ 79, 34, 34, 34, 80, 34, 34, 34,
814
+ 34, 34, 34, 1, 81, 81, 82, 1,
815
+ 82, 83, 82, 84, 85, 86, 89, 87,
816
+ 88, 88, 1, 90, 1, 91, 91, 1,
817
+ 91, 91, 84, 85, 86, 89, 87, 88,
818
+ 88, 1, 92, 93, 92, 94, 94, 94,
819
+ 1, 92, 92, 94, 94, 94, 1, 92,
820
+ 95, 92, 94, 94, 94, 1, 94, 96,
821
+ 96, 1, 97, 98, 99, 100, 98, 96,
822
+ 96, 96, 1, 98, 98, 96, 96, 96,
823
+ 1, 97, 100, 94, 96, 96, 1, 101,
824
+ 103, 102, 104, 1, 105, 106, 1, 107,
825
+ 108, 1, 109, 1, 110, 1, 110, 109,
826
+ 1, 110, 108, 1, 110, 111, 1, 110,
827
+ 106, 1, 110, 112, 111, 106, 1, 110,
828
+ 113, 106, 108, 1, 110, 114, 108, 109,
829
+ 1, 110, 109, 1, 115, 116, 117, 118,
830
+ 96, 96, 1, 92, 119, 92, 94, 94,
831
+ 94, 1, 120, 121, 122, 123, 96, 96,
832
+ 1, 92, 124, 92, 94, 94, 94, 1,
833
+ 125, 126, 127, 128, 96, 96, 1, 97,
834
+ 92, 95, 100, 92, 94, 94, 94, 1,
835
+ 97, 92, 95, 100, 92, 128, 94, 94,
836
+ 1, 97, 92, 95, 100, 92, 125, 94,
837
+ 94, 1, 97, 92, 95, 129, 100, 92,
838
+ 128, 125, 94, 94, 1, 97, 92, 95,
839
+ 100, 92, 125, 94, 94, 94, 1, 92,
840
+ 124, 92, 123, 94, 94, 1, 92, 124,
841
+ 92, 120, 94, 94, 1, 92, 124, 130,
842
+ 92, 123, 120, 94, 94, 1, 92, 124,
843
+ 92, 120, 94, 94, 94, 1, 92, 119,
844
+ 92, 118, 94, 94, 1, 92, 119, 92,
845
+ 115, 94, 94, 1, 92, 119, 131, 92,
846
+ 118, 115, 94, 94, 1, 92, 119, 92,
847
+ 115, 94, 94, 94, 1, 92, 93, 92,
848
+ 132, 94, 94, 1, 92, 93, 92, 133,
849
+ 94, 94, 1, 92, 93, 134, 92, 132,
850
+ 133, 94, 94, 1, 92, 93, 92, 133,
851
+ 94, 94, 94, 1, 136, 135, 135, 135,
852
+ 1, 138, 137, 137, 137, 1, 138, 139,
853
+ 139, 139, 1, 138, 140, 140, 140, 1,
854
+ 138, 1, 142, 141, 141, 141, 1, 144,
855
+ 143, 143, 143, 1, 144, 145, 145, 145,
856
+ 1, 144, 146, 146, 146, 1, 144, 1,
857
+ 148, 147, 147, 147, 1, 150, 149, 149,
858
+ 149, 1, 150, 151, 151, 151, 1, 150,
859
+ 152, 152, 152, 1, 150, 1, 154, 153,
860
+ 153, 153, 1, 156, 155, 155, 155, 1,
861
+ 156, 157, 157, 157, 1, 156, 158, 158,
862
+ 158, 1, 156, 1, 160, 159, 159, 159,
863
+ 1, 162, 161, 161, 161, 1, 162, 163,
864
+ 163, 163, 1, 162, 164, 164, 164, 1,
865
+ 162, 1, 166, 165, 165, 165, 1, 168,
866
+ 167, 167, 167, 1, 168, 169, 169, 169,
867
+ 1, 168, 170, 170, 170, 1, 168, 1,
868
+ 171, 172, 173, 175, 174, 176, 176, 1,
869
+ 177, 179, 178, 178, 178, 1, 180, 181,
870
+ 182, 183, 1, 184, 1, 185, 186, 187,
871
+ 188, 1, 189, 1, 190, 191, 192, 193,
872
+ 1, 194, 1, 97, 100, 1, 194, 193,
873
+ 1, 194, 190, 1, 195, 194, 193, 190,
874
+ 1, 194, 190, 1, 189, 188, 1, 189,
875
+ 185, 1, 189, 196, 188, 185, 1, 189,
876
+ 185, 1, 184, 183, 1, 184, 180, 1,
877
+ 184, 197, 183, 180, 1, 184, 180, 1,
878
+ 179, 198, 198, 198, 1, 179, 199, 199,
879
+ 199, 1, 179, 1, 190, 200, 200, 200,
880
+ 1, 194, 201, 201, 201, 1, 194, 202,
881
+ 202, 202, 1, 194, 190, 190, 190, 1,
882
+ 177, 179, 203, 178, 178, 1, 177, 179,
883
+ 204, 198, 198, 1, 177, 179, 199, 199,
884
+ 199, 1, 177, 205, 179, 203, 206, 178,
885
+ 178, 1, 177, 179, 204, 198, 198, 198,
886
+ 1, 177, 179, 198, 198, 198, 1, 177,
887
+ 179, 206, 178, 178, 1, 194, 200, 200,
888
+ 200, 1, 179, 178, 178, 178, 1, 207,
889
+ 208, 209, 194, 210, 211, 211, 1, 177,
890
+ 213, 194, 212, 212, 212, 1, 213, 194,
891
+ 214, 214, 214, 1, 213, 194, 215, 215,
892
+ 215, 1, 213, 194, 1, 200, 200, 200,
893
+ 1, 177, 213, 194, 216, 212, 212, 1,
894
+ 177, 213, 194, 217, 214, 214, 1, 177,
895
+ 213, 194, 215, 215, 215, 1, 177, 218,
896
+ 213, 194, 216, 219, 212, 212, 1, 177,
897
+ 213, 194, 217, 214, 214, 214, 1, 177,
898
+ 213, 194, 214, 214, 214, 1, 177, 213,
899
+ 194, 219, 212, 212, 1, 213, 194, 212,
900
+ 212, 212, 1, 220, 221, 222, 194, 223,
901
+ 224, 224, 1, 177, 226, 194, 225, 225,
902
+ 225, 1, 226, 194, 227, 227, 227, 1,
903
+ 226, 194, 228, 228, 228, 1, 226, 194,
904
+ 1, 207, 208, 209, 210, 211, 211, 1,
905
+ 177, 226, 194, 229, 225, 225, 1, 177,
906
+ 226, 194, 230, 227, 227, 1, 177, 226,
907
+ 194, 228, 228, 228, 1, 177, 231, 226,
908
+ 194, 229, 232, 225, 225, 1, 177, 226,
909
+ 194, 230, 227, 227, 227, 1, 177, 226,
910
+ 194, 227, 227, 227, 1, 177, 226, 194,
911
+ 232, 225, 225, 1, 226, 194, 225, 225,
912
+ 225, 1, 233, 234, 235, 194, 236, 237,
913
+ 237, 1, 177, 239, 194, 238, 238, 238,
914
+ 1, 239, 194, 240, 240, 240, 1, 239,
915
+ 194, 241, 241, 241, 1, 239, 194, 1,
916
+ 220, 221, 222, 223, 224, 224, 1, 177,
917
+ 239, 194, 242, 238, 238, 1, 177, 239,
918
+ 194, 243, 240, 240, 1, 177, 239, 194,
919
+ 241, 241, 241, 1, 177, 244, 239, 194,
920
+ 242, 245, 238, 238, 1, 177, 239, 194,
921
+ 243, 240, 240, 240, 1, 177, 239, 194,
922
+ 240, 240, 240, 1, 177, 239, 194, 245,
923
+ 238, 238, 1, 239, 194, 238, 238, 238,
924
+ 1, 246, 247, 248, 194, 249, 250, 250,
925
+ 1, 177, 252, 194, 251, 251, 251, 1,
926
+ 252, 194, 253, 253, 253, 1, 252, 194,
927
+ 254, 254, 254, 1, 252, 194, 1, 233,
928
+ 234, 235, 236, 237, 237, 1, 177, 252,
929
+ 194, 255, 251, 251, 1, 177, 252, 194,
930
+ 256, 253, 253, 1, 177, 252, 194, 254,
931
+ 254, 254, 1, 177, 257, 252, 194, 255,
932
+ 258, 251, 251, 1, 177, 252, 194, 256,
933
+ 253, 253, 253, 1, 177, 252, 194, 253,
934
+ 253, 253, 1, 177, 252, 194, 258, 251,
935
+ 251, 1, 252, 194, 251, 251, 251, 1,
936
+ 259, 260, 261, 194, 262, 263, 263, 1,
937
+ 177, 265, 194, 264, 264, 264, 1, 265,
938
+ 194, 266, 266, 266, 1, 265, 194, 267,
939
+ 267, 267, 1, 265, 194, 1, 246, 247,
940
+ 248, 249, 250, 250, 1, 177, 265, 194,
941
+ 268, 264, 264, 1, 177, 265, 194, 269,
942
+ 266, 266, 1, 177, 265, 194, 267, 267,
943
+ 267, 1, 177, 270, 265, 194, 268, 271,
944
+ 264, 264, 1, 177, 265, 194, 269, 266,
945
+ 266, 266, 1, 177, 265, 194, 266, 266,
946
+ 266, 1, 177, 265, 194, 271, 264, 264,
947
+ 1, 265, 194, 264, 264, 264, 1, 272,
948
+ 1, 273, 274, 275, 194, 276, 277, 277,
949
+ 1, 177, 279, 194, 278, 278, 278, 1,
950
+ 279, 194, 280, 280, 280, 1, 279, 194,
951
+ 281, 281, 281, 1, 279, 194, 1, 259,
952
+ 260, 261, 262, 263, 263, 1, 177, 279,
953
+ 194, 282, 278, 278, 1, 177, 279, 194,
954
+ 283, 280, 280, 1, 177, 279, 194, 281,
955
+ 281, 281, 1, 177, 284, 279, 194, 282,
956
+ 285, 278, 278, 1, 177, 279, 194, 283,
957
+ 280, 280, 280, 1, 177, 279, 194, 280,
958
+ 280, 280, 1, 177, 279, 194, 285, 278,
959
+ 278, 1, 279, 194, 278, 278, 278, 1,
960
+ 33, 33, 34, 34, 34, 35, 286, 286,
961
+ 34, 34, 34, 34, 34, 34, 1, 33,
962
+ 33, 34, 34, 34, 35, 287, 287, 34,
963
+ 34, 34, 34, 34, 34, 1, 33, 33,
964
+ 34, 34, 34, 35, 288, 288, 34, 34,
965
+ 34, 34, 34, 34, 1, 33, 33, 34,
966
+ 34, 34, 35, 289, 289, 34, 34, 34,
967
+ 34, 34, 34, 1, 33, 33, 34, 34,
968
+ 34, 35, 290, 290, 34, 34, 34, 34,
969
+ 34, 34, 1, 291, 291, 34, 34, 34,
970
+ 292, 34, 34, 34, 34, 34, 34, 1,
971
+ 293, 293, 294, 1, 294, 295, 294, 296,
972
+ 1, 297, 1, 298, 298, 1, 298, 298,
973
+ 296, 1, 299, 300, 1, 33, 33, 34,
974
+ 34, 34, 35, 301, 301, 34, 34, 34,
975
+ 34, 34, 34, 1, 33, 33, 34, 34,
976
+ 34, 35, 302, 302, 34, 34, 34, 34,
977
+ 34, 34, 1, 33, 33, 34, 34, 34,
978
+ 303, 34, 35, 34, 34, 34, 34, 34,
979
+ 1, 33, 33, 34, 34, 34, 35, 304,
980
+ 304, 34, 34, 34, 34, 34, 34, 1,
981
+ 33, 33, 34, 34, 34, 35, 305, 305,
982
+ 34, 34, 34, 34, 34, 34, 1, 33,
983
+ 33, 34, 34, 34, 35, 306, 306, 34,
984
+ 34, 34, 34, 34, 34, 1, 33, 33,
985
+ 34, 34, 34, 35, 307, 307, 34, 34,
986
+ 34, 34, 34, 34, 1, 33, 33, 34,
987
+ 34, 34, 35, 308, 308, 34, 34, 34,
988
+ 34, 34, 34, 1, 33, 33, 34, 34,
989
+ 34, 35, 309, 309, 34, 34, 34, 34,
990
+ 34, 34, 1, 33, 33, 34, 34, 34,
991
+ 35, 310, 310, 34, 34, 34, 34, 34,
992
+ 34, 1, 33, 33, 34, 34, 34, 35,
993
+ 311, 311, 34, 34, 34, 34, 34, 34,
994
+ 1, 33, 33, 34, 34, 34, 35, 312,
995
+ 312, 34, 34, 34, 34, 34, 34, 1,
996
+ 33, 33, 34, 34, 34, 313, 34, 35,
997
+ 34, 34, 34, 34, 34, 1, 33, 33,
998
+ 34, 34, 34, 35, 314, 315, 316, 317,
999
+ 314, 315, 316, 317, 34, 34, 34, 34,
1000
+ 34, 34, 1, 33, 33, 34, 34, 34,
1001
+ 35, 318, 318, 34, 34, 34, 34, 34,
1002
+ 34, 1, 33, 33, 34, 34, 34, 35,
1003
+ 319, 319, 34, 34, 34, 34, 34, 34,
1004
+ 1, 320, 320, 34, 34, 34, 321, 34,
1005
+ 34, 34, 34, 34, 34, 1, 322, 322,
1006
+ 323, 1, 323, 324, 323, 325, 1, 326,
1007
+ 1, 327, 327, 1, 327, 327, 325, 1,
1008
+ 328, 329, 1, 328, 330, 1, 328, 331,
1009
+ 1, 328, 332, 1, 328, 333, 1, 328,
1010
+ 334, 1, 328, 335, 1, 328, 336, 1,
1011
+ 328, 337, 1, 328, 338, 1, 328, 339,
1012
+ 1, 328, 340, 1, 328, 341, 1, 328,
1013
+ 342, 1, 328, 343, 1, 328, 344, 1,
1014
+ 328, 345, 1, 328, 346, 1, 328, 347,
1015
+ 1, 328, 348, 1, 328, 349, 1, 328,
1016
+ 350, 1, 328, 351, 1, 328, 352, 1,
1017
+ 328, 353, 1, 328, 354, 1, 328, 355,
1018
+ 1, 328, 356, 1, 328, 357, 1, 328,
1019
+ 358, 1, 328, 359, 1, 328, 360, 1,
1020
+ 328, 361, 1, 328, 362, 1, 328, 363,
1021
+ 1, 328, 364, 1, 328, 365, 1, 328,
1022
+ 366, 1, 328, 367, 1, 328, 368, 1,
1023
+ 328, 369, 1, 328, 370, 1, 328, 371,
1024
+ 1, 328, 372, 1, 328, 373, 1, 328,
1025
+ 374, 1, 328, 375, 1, 328, 376, 1,
1026
+ 328, 377, 1, 328, 1, 33, 33, 34,
1027
+ 34, 34, 35, 378, 378, 34, 34, 34,
1028
+ 34, 34, 34, 1, 33, 33, 34, 34,
1029
+ 34, 35, 379, 379, 34, 34, 34, 34,
1030
+ 34, 34, 1, 33, 33, 34, 34, 34,
1031
+ 35, 380, 380, 34, 34, 34, 34, 34,
1032
+ 34, 1, 33, 33, 34, 34, 34, 35,
1033
+ 381, 381, 34, 34, 34, 34, 34, 34,
1034
+ 1, 33, 33, 34, 34, 34, 35, 382,
1035
+ 382, 34, 34, 34, 34, 34, 34, 1,
1036
+ 33, 33, 34, 34, 34, 35, 383, 383,
1037
+ 34, 34, 34, 34, 34, 34, 1, 33,
1038
+ 33, 34, 34, 34, 35, 384, 384, 34,
1039
+ 34, 34, 34, 34, 34, 1, 385, 385,
1040
+ 34, 34, 34, 386, 34, 34, 34, 34,
1041
+ 34, 34, 1, 387, 387, 388, 1, 388,
1042
+ 389, 388, 390, 390, 390, 390, 390, 390,
1043
+ 390, 390, 390, 1, 391, 1, 392, 392,
1044
+ 1, 392, 392, 390, 390, 390, 390, 390,
1045
+ 390, 390, 390, 390, 1, 393, 394, 393,
1046
+ 395, 395, 395, 396, 395, 395, 395, 395,
1047
+ 395, 1, 397, 398, 397, 399, 1, 400,
1048
+ 1, 401, 401, 1, 401, 401, 399, 1,
1049
+ 399, 402, 399, 403, 403, 403, 403, 403,
1050
+ 403, 403, 403, 403, 1, 404, 1, 405,
1051
+ 405, 1, 405, 405, 403, 403, 403, 403,
1052
+ 403, 403, 403, 403, 403, 1, 406, 1,
1053
+ 401, 25, 401, 26, 26, 26, 27, 28,
1054
+ 29, 30, 31, 27, 28, 29, 30, 31,
1055
+ 26, 26, 26, 26, 26, 26, 1, 33,
1056
+ 33, 34, 34, 34, 35, 407, 407, 34,
1057
+ 34, 34, 34, 34, 34, 1, 33, 33,
1058
+ 34, 34, 34, 35, 408, 408, 34, 34,
1059
+ 34, 34, 34, 34, 1, 33, 33, 34,
1060
+ 34, 34, 35, 409, 409, 34, 34, 34,
1061
+ 34, 34, 34, 1, 33, 33, 34, 34,
1062
+ 34, 35, 410, 410, 34, 34, 34, 34,
1063
+ 34, 34, 1, 33, 33, 34, 34, 34,
1064
+ 35, 411, 411, 34, 34, 34, 34, 34,
1065
+ 34, 1, 33, 33, 34, 34, 34, 35,
1066
+ 412, 412, 34, 34, 34, 34, 34, 34,
1067
+ 1, 413, 413, 34, 34, 34, 414, 34,
1068
+ 34, 34, 34, 34, 34, 1, 415, 415,
1069
+ 416, 1, 416, 417, 416, 418, 418, 418,
1070
+ 418, 418, 418, 418, 418, 418, 1, 419,
1071
+ 1, 420, 420, 1, 420, 420, 418, 418,
1072
+ 418, 418, 418, 418, 418, 418, 418, 1,
1073
+ 421, 422, 422, 422, 422, 422, 422, 422,
1074
+ 422, 422, 1, 33, 33, 34, 34, 34,
1075
+ 35, 423, 423, 34, 34, 34, 34, 34,
1076
+ 34, 1, 33, 33, 34, 34, 34, 35,
1077
+ 424, 424, 34, 34, 34, 34, 34, 34,
1078
+ 1, 33, 33, 34, 34, 34, 35, 425,
1079
+ 425, 34, 34, 34, 34, 34, 34, 1,
1080
+ 33, 33, 34, 34, 34, 35, 426, 426,
1081
+ 34, 34, 34, 34, 34, 34, 1, 33,
1082
+ 33, 34, 34, 34, 35, 427, 427, 34,
1083
+ 34, 34, 34, 34, 34, 1, 33, 33,
1084
+ 34, 34, 34, 35, 428, 428, 34, 34,
1085
+ 34, 34, 34, 34, 1, 429, 429, 34,
1086
+ 34, 34, 430, 34, 34, 34, 34, 34,
1087
+ 34, 1, 431, 431, 432, 1, 432, 433,
1088
+ 432, 434, 1, 435, 1, 436, 436, 1,
1089
+ 436, 436, 434, 1, 437, 438, 1, 437,
1090
+ 439, 1, 437, 1, 33, 33, 34, 34,
1091
+ 34, 35, 440, 440, 34, 34, 34, 34,
1092
+ 34, 34, 1, 33, 33, 34, 34, 34,
1093
+ 35, 441, 441, 34, 34, 34, 34, 34,
1094
+ 34, 1, 33, 33, 34, 34, 34, 35,
1095
+ 442, 442, 34, 34, 34, 34, 34, 34,
1096
+ 1, 33, 33, 34, 34, 34, 443, 34,
1097
+ 35, 34, 34, 34, 34, 34, 1, 33,
1098
+ 33, 34, 34, 34, 35, 444, 444, 34,
1099
+ 34, 34, 34, 34, 34, 1, 33, 33,
1100
+ 34, 34, 34, 35, 445, 445, 34, 34,
1101
+ 34, 34, 34, 34, 1, 33, 33, 34,
1102
+ 34, 34, 35, 446, 446, 34, 34, 34,
1103
+ 34, 34, 34, 1, 33, 33, 34, 34,
1104
+ 34, 35, 447, 447, 34, 34, 34, 34,
1105
+ 34, 34, 1, 33, 33, 34, 34, 34,
1106
+ 35, 448, 448, 34, 34, 34, 34, 34,
1107
+ 34, 1, 33, 33, 34, 34, 34, 35,
1108
+ 449, 449, 34, 34, 34, 34, 34, 34,
1109
+ 1, 450, 450, 34, 34, 34, 451, 34,
1110
+ 34, 34, 34, 34, 34, 1, 452, 452,
1111
+ 453, 1, 453, 454, 453, 455, 1, 456,
1112
+ 1, 457, 457, 1, 457, 457, 455, 1,
1113
+ 458, 459, 1, 458, 460, 1, 458, 461,
1114
+ 1, 458, 462, 1, 458, 463, 1, 458,
1115
+ 464, 1, 458, 465, 1, 458, 466, 1,
1116
+ 458, 1, 467, 1, 468, 25, 468, 26,
1117
+ 26, 26, 27, 28, 29, 30, 31, 27,
1118
+ 28, 29, 30, 31, 26, 26, 26, 26,
1119
+ 26, 26, 1, 469, 470, 469, 1, 1,
1120
+ 38, 22, 1, 19, 1, 472, 1, 473,
1121
+ 1, 1, 471, 475, 1, 476, 1, 1,
1122
+ 474, 477, 477, 477, 1, 474, 474, 474,
1123
+ 1, 478, 478, 478, 1, 8, 8, 8,
1124
+ 1, 480, 481, 482, 1, 1, 479, 484,
1125
+ 485, 486, 1, 1, 483, 487, 487, 487,
1126
+ 1, 483, 483, 483, 1, 5, 6, 6,
1127
+ 6, 488, 6, 6, 6, 6, 6, 6,
1128
+ 1, 5, 6, 6, 6, 489, 6, 6,
1129
+ 6, 6, 6, 6, 1, 490, 6, 6,
1130
+ 6, 6, 6, 6, 6, 6, 6, 1,
1131
+ 5, 6, 6, 6, 491, 6, 6, 6,
1132
+ 6, 6, 6, 1, 5, 6, 6, 6,
1133
+ 492, 6, 6, 6, 6, 6, 6, 1,
1134
+ 5, 6, 6, 6, 493, 6, 6, 6,
1135
+ 6, 6, 6, 1, 5, 6, 6, 6,
1136
+ 494, 6, 6, 6, 6, 6, 6, 1,
1137
+ 5, 6, 6, 6, 495, 6, 6, 6,
1138
+ 6, 6, 6, 1, 5, 6, 6, 6,
1139
+ 496, 6, 6, 6, 6, 6, 6, 1,
1140
+ 497, 6, 6, 6, 6, 6, 6, 6,
1141
+ 6, 6, 1, 5, 6, 6, 6, 498,
1142
+ 6, 6, 6, 6, 6, 6, 1, 5,
1143
+ 6, 6, 6, 499, 6, 6, 6, 6,
1144
+ 6, 6, 1, 5, 6, 6, 6, 500,
1145
+ 6, 6, 6, 6, 6, 6, 1, 501,
1146
+ 6, 6, 6, 6, 6, 6, 6, 6,
1147
+ 6, 1, 1, 0
1148
+ };
1149
+
1150
+ static const short _ws_http_request_parser_trans_targs[] = {
1151
+ 2, 0, 428, 431, 438, 3, 2, 4,
1152
+ 4, 5, 418, 422, 424, 6, 7, 8,
1153
+ 9, 10, 11, 12, 417, 13, 14, 416,
1154
+ 15, 16, 17, 23, 49, 252, 264, 360,
1155
+ 442, 18, 17, 19, 18, 19, 20, 19,
1156
+ 413, 20, 21, 22, 24, 25, 26, 388,
1157
+ 27, 28, 29, 30, 31, 32, 33, 34,
1158
+ 33, 34, 35, 38, 36, 37, 39, 47,
1159
+ 38, 43, 39, 40, 43, 41, 42, 44,
1160
+ 38, 45, 46, 48, 50, 51, 52, 53,
1161
+ 54, 53, 54, 55, 58, 96, 98, 97,
1162
+ 62, 100, 56, 57, 59, 78, 60, 61,
1163
+ 62, 14, 63, 64, 65, 66, 72, 74,
1164
+ 73, 67, 71, 68, 70, 69, 14, 73,
1165
+ 75, 76, 77, 79, 92, 94, 93, 80,
1166
+ 81, 88, 90, 89, 82, 83, 84, 86,
1167
+ 85, 87, 91, 95, 97, 58, 99, 101,
1168
+ 237, 102, 105, 103, 104, 106, 223, 107,
1169
+ 110, 108, 109, 111, 209, 112, 115, 113,
1170
+ 114, 116, 195, 117, 120, 118, 119, 121,
1171
+ 181, 122, 125, 123, 124, 126, 167, 127,
1172
+ 130, 128, 129, 131, 158, 161, 164, 165,
1173
+ 166, 132, 151, 154, 133, 147, 149, 148,
1174
+ 134, 135, 143, 145, 144, 136, 137, 139,
1175
+ 141, 140, 138, 142, 146, 150, 152, 153,
1176
+ 155, 156, 157, 159, 160, 162, 163, 168,
1177
+ 173, 176, 179, 180, 169, 172, 170, 171,
1178
+ 174, 175, 177, 178, 182, 187, 190, 193,
1179
+ 194, 183, 186, 184, 185, 188, 189, 191,
1180
+ 192, 196, 201, 204, 207, 208, 197, 200,
1181
+ 198, 199, 202, 203, 205, 206, 210, 215,
1182
+ 218, 221, 222, 211, 214, 212, 213, 216,
1183
+ 217, 219, 220, 224, 229, 232, 235, 236,
1184
+ 225, 228, 226, 227, 230, 231, 233, 234,
1185
+ 238, 239, 244, 247, 250, 251, 240, 243,
1186
+ 241, 242, 245, 246, 248, 249, 253, 254,
1187
+ 255, 256, 257, 258, 259, 258, 259, 260,
1188
+ 263, 261, 262, 14, 263, 265, 266, 267,
1189
+ 268, 269, 270, 271, 272, 273, 274, 275,
1190
+ 276, 277, 278, 252, 336, 373, 279, 280,
1191
+ 281, 282, 281, 282, 283, 286, 284, 285,
1192
+ 14, 287, 288, 289, 290, 291, 292, 293,
1193
+ 294, 295, 296, 297, 298, 299, 300, 301,
1194
+ 302, 303, 304, 305, 306, 307, 308, 309,
1195
+ 310, 311, 312, 313, 314, 315, 316, 317,
1196
+ 318, 319, 320, 321, 322, 323, 324, 325,
1197
+ 326, 327, 328, 329, 330, 331, 332, 333,
1198
+ 334, 335, 337, 338, 339, 340, 341, 342,
1199
+ 343, 344, 345, 344, 345, 346, 349, 347,
1200
+ 348, 350, 358, 349, 354, 350, 351, 354,
1201
+ 352, 353, 355, 349, 356, 357, 359, 361,
1202
+ 362, 363, 364, 365, 366, 367, 368, 367,
1203
+ 368, 369, 372, 370, 371, 14, 372, 374,
1204
+ 375, 376, 377, 378, 379, 380, 381, 380,
1205
+ 381, 382, 385, 383, 384, 14, 386, 387,
1206
+ 389, 390, 391, 392, 393, 394, 395, 396,
1207
+ 397, 398, 399, 400, 399, 400, 401, 404,
1208
+ 402, 403, 14, 405, 406, 407, 408, 409,
1209
+ 410, 411, 412, 414, 415, 415, 21, 419,
1210
+ 5, 420, 419, 5, 420, 421, 423, 425,
1211
+ 5, 418, 426, 425, 5, 418, 426, 427,
1212
+ 429, 430, 3, 432, 433, 434, 435, 436,
1213
+ 437, 3, 439, 440, 441, 3
1214
+ };
1215
+
1216
+ static const char _ws_http_request_parser_trans_actions[] = {
1217
+ 1, 0, 1, 1, 1, 38, 0, 1,
1218
+ 0, 41, 11, 0, 11, 1, 0, 0,
1219
+ 0, 0, 0, 0, 0, 0, 19, 0,
1220
+ 0, 9, 35, 35, 35, 35, 35, 35,
1221
+ 27, 3, 0, 3, 0, 0, 5, 5,
1222
+ 32, 0, 7, 0, 0, 0, 0, 0,
1223
+ 0, 0, 0, 0, 0, 0, 3, 3,
1224
+ 0, 0, 0, 29, 0, 0, 23, 62,
1225
+ 0, 23, 0, 0, 0, 0, 0, 0,
1226
+ 1, 0, 0, 0, 0, 0, 0, 3,
1227
+ 3, 0, 0, 0, 29, 29, 29, 29,
1228
+ 29, 29, 0, 0, 0, 0, 0, 0,
1229
+ 0, 53, 0, 0, 21, 1, 1, 1,
1230
+ 1, 0, 0, 0, 0, 0, 56, 0,
1231
+ 0, 0, 0, 0, 0, 0, 0, 0,
1232
+ 0, 0, 0, 0, 0, 0, 0, 0,
1233
+ 0, 0, 0, 0, 0, 0, 0, 0,
1234
+ 0, 0, 0, 0, 0, 0, 0, 0,
1235
+ 0, 0, 0, 0, 0, 0, 0, 0,
1236
+ 0, 0, 0, 0, 0, 0, 0, 0,
1237
+ 0, 0, 0, 0, 0, 0, 0, 0,
1238
+ 0, 0, 0, 0, 0, 0, 0, 0,
1239
+ 0, 0, 0, 0, 0, 0, 0, 0,
1240
+ 0, 0, 0, 0, 0, 0, 0, 0,
1241
+ 0, 0, 0, 0, 0, 0, 0, 0,
1242
+ 0, 0, 0, 0, 0, 0, 0, 0,
1243
+ 0, 0, 0, 0, 0, 0, 0, 0,
1244
+ 0, 0, 0, 0, 0, 0, 0, 0,
1245
+ 0, 0, 0, 0, 0, 0, 0, 0,
1246
+ 0, 0, 0, 0, 0, 0, 0, 0,
1247
+ 0, 0, 0, 0, 0, 0, 0, 0,
1248
+ 0, 0, 0, 0, 0, 0, 0, 0,
1249
+ 0, 0, 0, 0, 0, 0, 0, 0,
1250
+ 0, 0, 0, 0, 0, 0, 0, 0,
1251
+ 0, 0, 0, 0, 0, 0, 0, 0,
1252
+ 0, 0, 0, 0, 0, 0, 0, 0,
1253
+ 0, 0, 0, 3, 3, 0, 0, 0,
1254
+ 29, 0, 0, 68, 0, 0, 0, 0,
1255
+ 0, 0, 0, 0, 0, 0, 0, 0,
1256
+ 0, 0, 0, 0, 0, 0, 0, 0,
1257
+ 3, 3, 0, 0, 0, 29, 0, 0,
1258
+ 74, 0, 0, 0, 0, 0, 0, 0,
1259
+ 0, 0, 0, 0, 0, 0, 0, 0,
1260
+ 0, 0, 0, 0, 0, 0, 0, 0,
1261
+ 0, 0, 0, 0, 0, 0, 0, 0,
1262
+ 0, 0, 0, 0, 0, 0, 0, 0,
1263
+ 0, 0, 0, 0, 0, 0, 0, 0,
1264
+ 0, 0, 0, 0, 0, 0, 0, 0,
1265
+ 0, 3, 3, 0, 0, 0, 29, 0,
1266
+ 0, 25, 77, 0, 25, 0, 0, 0,
1267
+ 0, 0, 0, 1, 0, 0, 0, 0,
1268
+ 0, 0, 0, 0, 0, 3, 3, 0,
1269
+ 0, 0, 29, 0, 0, 65, 0, 0,
1270
+ 0, 0, 0, 0, 0, 3, 3, 0,
1271
+ 0, 0, 29, 0, 0, 71, 0, 0,
1272
+ 0, 0, 0, 0, 0, 0, 0, 0,
1273
+ 0, 0, 3, 3, 0, 0, 0, 29,
1274
+ 0, 0, 59, 0, 0, 0, 0, 0,
1275
+ 0, 0, 0, 0, 0, 5, 32, 17,
1276
+ 96, 17, 0, 50, 0, 0, 0, 13,
1277
+ 92, 44, 13, 0, 47, 15, 0, 0,
1278
+ 0, 0, 80, 0, 0, 0, 0, 0,
1279
+ 0, 88, 0, 0, 0, 84
1280
+ };
1281
+
1282
+ static const int ws_http_request_parser_start = 1;
1283
+ static const int ws_http_request_parser_first_final = 442;
1284
+ static const int ws_http_request_parser_error = 0;
1285
+
1286
+ static const int ws_http_request_parser_en_main = 1;
1287
+
1288
+
1289
+ #line 142 "ws_http_parser.rl"
1290
+
1291
+ int ws_http_request_parser_init(ws_http_request_parser *parser)
1292
+ {
1293
+ int cs = 0;
1294
+
1295
+ #line 1296 "ws_http_parser.c"
1296
+ {
1297
+ cs = ws_http_request_parser_start;
1298
+ }
1299
+
1300
+ #line 147 "ws_http_parser.rl"
1301
+ parser->cs = cs;
1302
+ parser->nread = 0;
1303
+ parser->error_start = NULL;
1304
+ parser->error_len = 0;
1305
+ parser->error_pos = 0;
1306
+
1307
+ parser->mark = 0;
1308
+ parser->hdr_field_start = 0;
1309
+ parser->hdr_field_len = 0;
1310
+ parser->hdr_value_start = 0;
1311
+ parser->hdr_value_len = 0;
1312
+ parser->query_start = 0;
1313
+ parser->fragment_start = 0;
1314
+
1315
+ parser->method = 0;
1316
+ parser->uri_scheme = 0;
1317
+
1318
+ parser->data = NULL;
1319
+
1320
+ return(1);
1321
+ }
1322
+
1323
+
1324
+ /** exec **/
1325
+ size_t ws_http_request_parser_execute(ws_http_request_parser *parser, const char *buffer, size_t len, size_t off)
1326
+ {
1327
+ const char *p, *pe;
1328
+ int cs = parser->cs;
1329
+
1330
+ assert(off <= len && "offset past end of buffer");
1331
+
1332
+ p = buffer+off;
1333
+ pe = buffer+len;
1334
+
1335
+ assert(*pe == '\0' && "pointer does not end on NULL");
1336
+ assert(pe - p == len - off && "pointers aren't same distance");
1337
+
1338
+
1339
+ #line 1340 "ws_http_parser.c"
1340
+ {
1341
+ int _klen;
1342
+ unsigned int _trans;
1343
+ const char *_acts;
1344
+ unsigned int _nacts;
1345
+ const char *_keys;
1346
+
1347
+ if ( p == pe )
1348
+ goto _test_eof;
1349
+ if ( cs == 0 )
1350
+ goto _out;
1351
+ _resume:
1352
+ _keys = _ws_http_request_parser_trans_keys + _ws_http_request_parser_key_offsets[cs];
1353
+ _trans = _ws_http_request_parser_index_offsets[cs];
1354
+
1355
+ _klen = _ws_http_request_parser_single_lengths[cs];
1356
+ if ( _klen > 0 ) {
1357
+ const char *_lower = _keys;
1358
+ const char *_mid;
1359
+ const char *_upper = _keys + _klen - 1;
1360
+ while (1) {
1361
+ if ( _upper < _lower )
1362
+ break;
1363
+
1364
+ _mid = _lower + ((_upper-_lower) >> 1);
1365
+ if ( (*p) < *_mid )
1366
+ _upper = _mid - 1;
1367
+ else if ( (*p) > *_mid )
1368
+ _lower = _mid + 1;
1369
+ else {
1370
+ _trans += (unsigned int)(_mid - _keys);
1371
+ goto _match;
1372
+ }
1373
+ }
1374
+ _keys += _klen;
1375
+ _trans += _klen;
1376
+ }
1377
+
1378
+ _klen = _ws_http_request_parser_range_lengths[cs];
1379
+ if ( _klen > 0 ) {
1380
+ const char *_lower = _keys;
1381
+ const char *_mid;
1382
+ const char *_upper = _keys + (_klen<<1) - 2;
1383
+ while (1) {
1384
+ if ( _upper < _lower )
1385
+ break;
1386
+
1387
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1);
1388
+ if ( (*p) < _mid[0] )
1389
+ _upper = _mid - 2;
1390
+ else if ( (*p) > _mid[1] )
1391
+ _lower = _mid + 2;
1392
+ else {
1393
+ _trans += (unsigned int)((_mid - _keys)>>1);
1394
+ goto _match;
1395
+ }
1396
+ }
1397
+ _trans += _klen;
1398
+ }
1399
+
1400
+ _match:
1401
+ _trans = _ws_http_request_parser_indicies[_trans];
1402
+ cs = _ws_http_request_parser_trans_targs[_trans];
1403
+
1404
+ if ( _ws_http_request_parser_trans_actions[_trans] == 0 )
1405
+ goto _again;
1406
+
1407
+ _acts = _ws_http_request_parser_actions + _ws_http_request_parser_trans_actions[_trans];
1408
+ _nacts = (unsigned int) *_acts++;
1409
+ while ( _nacts-- > 0 )
1410
+ {
1411
+ switch ( *_acts++ )
1412
+ {
1413
+ case 0:
1414
+ #line 20 "ws_http_parser.rl"
1415
+ { MARK(mark, p); }
1416
+ break;
1417
+ case 1:
1418
+ #line 22 "ws_http_parser.rl"
1419
+ {
1420
+ MARK(hdr_field_start, p);
1421
+ }
1422
+ break;
1423
+ case 2:
1424
+ #line 26 "ws_http_parser.rl"
1425
+ {
1426
+ parser->hdr_field_len = LEN(hdr_field_start, p);
1427
+ }
1428
+ break;
1429
+ case 3:
1430
+ #line 30 "ws_http_parser.rl"
1431
+ { MARK(hdr_value_start, p); }
1432
+ break;
1433
+ case 4:
1434
+ #line 32 "ws_http_parser.rl"
1435
+ {
1436
+ parser->hdr_value_len = LEN(hdr_value_start, p);
1437
+ }
1438
+ break;
1439
+ case 5:
1440
+ #line 36 "ws_http_parser.rl"
1441
+ {
1442
+ if (parser->hdr_value_start) {
1443
+ parser->header(parser->data, PTR_TO(hdr_field_start), parser->hdr_field_len, PTR_TO(hdr_value_start), parser->hdr_value_len);
1444
+ }
1445
+ }
1446
+ break;
1447
+ case 6:
1448
+ #line 42 "ws_http_parser.rl"
1449
+ { parser->method = method_GET; }
1450
+ break;
1451
+ case 7:
1452
+ #line 43 "ws_http_parser.rl"
1453
+ { parser->method = method_POST; }
1454
+ break;
1455
+ case 8:
1456
+ #line 44 "ws_http_parser.rl"
1457
+ { parser->method = method_OPTIONS; }
1458
+ break;
1459
+ case 9:
1460
+ #line 45 "ws_http_parser.rl"
1461
+ {
1462
+ if (!parser->method) {
1463
+ parser->method = method_unknown;
1464
+ }
1465
+ }
1466
+ break;
1467
+ case 10:
1468
+ #line 51 "ws_http_parser.rl"
1469
+ {
1470
+ parser->request.method(parser->data, PTR_TO(mark), LEN(mark, p), parser->method);
1471
+ }
1472
+ break;
1473
+ case 11:
1474
+ #line 55 "ws_http_parser.rl"
1475
+ {
1476
+ parser->request.request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
1477
+ }
1478
+ break;
1479
+ case 12:
1480
+ #line 59 "ws_http_parser.rl"
1481
+ {
1482
+ parser->request.request_path(parser->data, PTR_TO(mark), LEN(mark, p));
1483
+ }
1484
+ break;
1485
+ case 13:
1486
+ #line 63 "ws_http_parser.rl"
1487
+ {
1488
+ MARK(query_start, p);
1489
+ }
1490
+ break;
1491
+ case 14:
1492
+ #line 67 "ws_http_parser.rl"
1493
+ {
1494
+ parser->request.query(parser->data, PTR_TO(query_start), LEN(query_start, p));
1495
+ }
1496
+ break;
1497
+ case 15:
1498
+ #line 71 "ws_http_parser.rl"
1499
+ {
1500
+ MARK(fragment_start, p);
1501
+ }
1502
+ break;
1503
+ case 16:
1504
+ #line 75 "ws_http_parser.rl"
1505
+ {
1506
+ parser->request.fragment(parser->data, PTR_TO(fragment_start), LEN(fragment_start, p));
1507
+ }
1508
+ break;
1509
+ case 17:
1510
+ #line 95 "ws_http_parser.rl"
1511
+ {
1512
+ parser->request.http_version(parser->data, PTR_TO(mark), LEN(mark, p));
1513
+ }
1514
+ break;
1515
+ case 18:
1516
+ #line 99 "ws_http_parser.rl"
1517
+ {
1518
+ parser->request.host(parser->data, PTR_TO(mark), LEN(mark, p));
1519
+ }
1520
+ break;
1521
+ case 19:
1522
+ #line 103 "ws_http_parser.rl"
1523
+ {
1524
+ parser->request.port(parser->data, PTR_TO(mark), LEN(mark, p));
1525
+ }
1526
+ break;
1527
+ case 20:
1528
+ #line 107 "ws_http_parser.rl"
1529
+ {
1530
+ parser->request.content_length(parser->data, PTR_TO(mark), LEN(mark, p));
1531
+ }
1532
+ break;
1533
+ case 21:
1534
+ #line 111 "ws_http_parser.rl"
1535
+ {
1536
+ parser->request.hdr_connection_value(parser->data, PTR_TO(mark), LEN(mark, p));
1537
+ }
1538
+ break;
1539
+ case 22:
1540
+ #line 115 "ws_http_parser.rl"
1541
+ {
1542
+ parser->request.hdr_upgrade(parser->data, PTR_TO(mark), LEN(mark, p));
1543
+ }
1544
+ break;
1545
+ case 23:
1546
+ #line 119 "ws_http_parser.rl"
1547
+ {
1548
+ parser->request.hdr_origin(parser->data, PTR_TO(mark), LEN(mark, p));
1549
+ }
1550
+ break;
1551
+ case 24:
1552
+ #line 123 "ws_http_parser.rl"
1553
+ {
1554
+ parser->request.hdr_sec_websocket_version(parser->data, PTR_TO(mark), LEN(mark, p));
1555
+ }
1556
+ break;
1557
+ case 25:
1558
+ #line 127 "ws_http_parser.rl"
1559
+ {
1560
+ parser->request.hdr_sec_websocket_key(parser->data, PTR_TO(mark), LEN(mark, p));
1561
+ }
1562
+ break;
1563
+ case 26:
1564
+ #line 131 "ws_http_parser.rl"
1565
+ {
1566
+ parser->request.hdr_sec_websocket_protocol_value(parser->data, PTR_TO(mark), LEN(mark, p));
1567
+ }
1568
+ break;
1569
+ case 27:
1570
+ #line 135 "ws_http_parser.rl"
1571
+ { {p++; goto _out; } }
1572
+ break;
1573
+ #line 1574 "ws_http_parser.c"
1574
+ }
1575
+ }
1576
+
1577
+ _again:
1578
+ if ( cs == 0 )
1579
+ goto _out;
1580
+ if ( ++p != pe )
1581
+ goto _resume;
1582
+ _test_eof: {}
1583
+ _out: {}
1584
+ }
1585
+
1586
+ #line 185 "ws_http_parser.rl"
1587
+
1588
+ parser->cs = cs;
1589
+ parser->nread += p - (buffer + off);
1590
+
1591
+ assert(p <= pe && "buffer overflow after parsing execute");
1592
+ assert(parser->nread <= len && "nread longer than length");
1593
+ assert(parser->mark < len && "mark is after buffer end");
1594
+ assert(parser->hdr_field_start < len && "field starts after buffer end");
1595
+ assert(parser->hdr_field_len <= len && "field has length longer than whole buffer");
1596
+ assert(parser->hdr_value_start < len && "value starts after buffer end");
1597
+ assert(parser->hdr_value_len <= len && "value has length longer than whole buffer");
1598
+
1599
+ if (ws_http_request_parser_has_error(parser)) {
1600
+ parser->error_start = (char *)buffer;
1601
+ parser->error_len = pe - buffer;
1602
+ parser->error_pos = p - buffer;
1603
+ /* DOC:
1604
+ * buffer is the start of the parsed data.
1605
+ * p is last position of the parsing.
1606
+ * pe is first position after data ends.
1607
+ */
1608
+ }
1609
+
1610
+ return(parser->nread);
1611
+ }
1612
+
1613
+ int ws_http_request_parser_finish(ws_http_request_parser *parser)
1614
+ {
1615
+ int cs = parser->cs;
1616
+
1617
+ parser->cs = cs;
1618
+
1619
+ if (ws_http_request_parser_has_error(parser))
1620
+ return -1;
1621
+ else if (ws_http_request_parser_is_finished(parser))
1622
+ return 1;
1623
+ else
1624
+ return 0;
1625
+ }
1626
+
1627
+ int ws_http_request_parser_has_error(ws_http_request_parser *parser)
1628
+ {
1629
+ return parser->cs == ws_http_request_parser_error;
1630
+ }
1631
+
1632
+ int ws_http_request_parser_is_finished(ws_http_request_parser *parser)
1633
+ {
1634
+ return parser->cs == ws_http_request_parser_first_final;
1635
+ }