mongrel 0.3.13.2 → 0.3.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. data/COPYING +39 -488
  2. data/LICENSE +39 -488
  3. data/Rakefile +1 -1
  4. data/bin/mongrel_rails +8 -0
  5. data/doc/rdoc/classes/IO.src/M000001.html +5 -5
  6. data/doc/rdoc/classes/IO.src/M000002.html +5 -5
  7. data/doc/rdoc/classes/Kernel.src/M000020.html +5 -5
  8. data/doc/rdoc/classes/Kernel.src/M000021.html +9 -9
  9. data/doc/rdoc/classes/Mongrel.html +4 -22
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +10 -10
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +33 -33
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +20 -20
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +13 -13
  14. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000105.html +11 -11
  15. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +4 -4
  16. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000107.html +4 -4
  17. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000108.html +4 -4
  18. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000109.html +5 -5
  19. data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +8 -8
  20. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +4 -4
  21. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +36 -36
  22. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +10 -10
  23. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +28 -28
  24. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +4 -4
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +4 -4
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +4 -4
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +4 -4
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +8 -8
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +4 -4
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +4 -4
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +4 -4
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +10 -10
  33. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +10 -10
  34. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +4 -4
  35. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +6 -6
  36. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +11 -11
  37. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +33 -33
  38. data/doc/rdoc/classes/Mongrel/Configurator.html +2 -2
  39. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +13 -13
  40. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +17 -17
  41. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -6
  42. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +6 -6
  43. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +9 -9
  44. data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +4 -4
  45. data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +23 -23
  46. data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -5
  47. data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +16 -16
  48. data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +18 -18
  49. data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +4 -4
  50. data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +10 -10
  51. data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +5 -5
  52. data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +4 -4
  53. data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +8 -8
  54. data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +11 -11
  55. data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +4 -4
  56. data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +21 -21
  57. data/doc/rdoc/classes/Mongrel/Configurator.src/M000128.html +4 -4
  58. data/doc/rdoc/classes/Mongrel/Configurator.src/M000129.html +19 -19
  59. data/doc/rdoc/classes/Mongrel/Configurator.src/M000130.html +4 -4
  60. data/doc/rdoc/classes/Mongrel/Const.html +1 -1
  61. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000099.html +5 -5
  62. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000100.html +14 -14
  63. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +7 -7
  64. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -29
  65. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +28 -28
  66. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +48 -48
  67. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +25 -25
  68. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +4 -4
  69. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000131.html +4 -4
  70. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000132.html +4 -4
  71. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000072.html +4 -4
  72. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000073.html +4 -4
  73. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000078.html +3 -3
  74. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000079.html +3 -3
  75. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000080.html +3 -3
  76. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +3 -3
  77. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +3 -3
  78. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +5 -5
  79. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000025.html +3 -3
  80. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +42 -42
  81. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000139.html +6 -6
  82. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000140.html +6 -6
  83. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000141.html +18 -18
  84. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +11 -11
  85. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +6 -6
  86. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +11 -11
  87. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +8 -8
  88. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -8
  89. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +8 -8
  90. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +17 -17
  91. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +7 -7
  92. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000089.html +6 -6
  93. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000090.html +6 -6
  94. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000091.html +6 -6
  95. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000092.html +4 -4
  96. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +11 -11
  97. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +71 -71
  98. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +17 -17
  99. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +7 -7
  100. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +36 -37
  101. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +20 -20
  102. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +4 -4
  103. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +8 -8
  104. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +25 -25
  105. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +11 -11
  106. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +12 -12
  107. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +8 -8
  108. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +36 -36
  109. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +9 -9
  110. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000136.html +8 -8
  111. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000137.html +13 -13
  112. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000133.html +10 -10
  113. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000134.html +10 -10
  114. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000135.html +4 -4
  115. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +4 -4
  116. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +10 -10
  117. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000076.html +28 -28
  118. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000077.html +6 -6
  119. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +4 -4
  120. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +4 -4
  121. data/doc/rdoc/classes/MongrelDbg.src/M000015.html +5 -5
  122. data/doc/rdoc/classes/MongrelDbg.src/M000016.html +6 -6
  123. data/doc/rdoc/classes/MongrelDbg.src/M000017.html +8 -8
  124. data/doc/rdoc/classes/MongrelDbg.src/M000018.html +7 -7
  125. data/doc/rdoc/classes/MongrelDbg.src/M000019.html +4 -4
  126. data/doc/rdoc/classes/ObjectTracker.src/M000013.html +13 -13
  127. data/doc/rdoc/classes/ObjectTracker.src/M000014.html +30 -30
  128. data/doc/rdoc/classes/RequestLog/Access.src/M000142.html +5 -5
  129. data/doc/rdoc/classes/RequestLog/Files.src/M000143.html +5 -5
  130. data/doc/rdoc/classes/RequestLog/Objects.src/M000145.html +5 -5
  131. data/doc/rdoc/classes/RequestLog/Params.src/M000146.html +5 -5
  132. data/doc/rdoc/classes/RequestLog/Threads.src/M000144.html +20 -20
  133. data/doc/rdoc/classes/Stats.src/M000005.html +5 -5
  134. data/doc/rdoc/classes/Stats.src/M000006.html +9 -9
  135. data/doc/rdoc/classes/Stats.src/M000007.html +12 -12
  136. data/doc/rdoc/classes/Stats.src/M000008.html +4 -4
  137. data/doc/rdoc/classes/Stats.src/M000009.html +4 -4
  138. data/doc/rdoc/classes/Stats.src/M000010.html +4 -4
  139. data/doc/rdoc/classes/Stats.src/M000011.html +9 -9
  140. data/doc/rdoc/classes/Stats.src/M000012.html +6 -6
  141. data/doc/rdoc/classes/TCPServer.src/M000003.html +5 -5
  142. data/doc/rdoc/created.rid +1 -1
  143. data/doc/rdoc/files/COPYING.html +51 -639
  144. data/doc/rdoc/files/LICENSE.html +51 -639
  145. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  146. data/doc/rdoc/files/lib/mongrel/camping_rb.html +6 -21
  147. data/doc/rdoc/files/lib/mongrel/cgi_rb.html +6 -21
  148. data/doc/rdoc/files/lib/mongrel/command_rb.html +6 -21
  149. data/doc/rdoc/files/lib/mongrel/debug_rb.html +6 -21
  150. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +13 -1
  151. data/doc/rdoc/files/lib/mongrel/init_rb.html +6 -21
  152. data/doc/rdoc/files/lib/mongrel/rails_rb.html +6 -21
  153. data/doc/rdoc/files/lib/mongrel/stats_rb.html +6 -21
  154. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +6 -21
  155. data/doc/rdoc/files/lib/mongrel_rb.html +6 -21
  156. data/ext/http11/http11.c +4 -19
  157. data/ext/http11/http11_parser.c +48 -63
  158. data/ext/http11/http11_parser.h +3 -17
  159. data/lib/http11.so +0 -0
  160. data/lib/mongrel.rb +10 -23
  161. data/lib/mongrel/camping.rb +4 -16
  162. data/lib/mongrel/cgi.rb +4 -16
  163. data/lib/mongrel/command.rb +4 -16
  164. data/lib/mongrel/debug.rb +4 -16
  165. data/lib/mongrel/handlers.rb +6 -17
  166. data/lib/mongrel/init.rb +4 -16
  167. data/lib/mongrel/rails.rb +4 -16
  168. data/lib/mongrel/stats.rb +4 -16
  169. data/lib/mongrel/tcphack.rb +4 -16
  170. data/test/test_command.rb +4 -16
  171. data/test/test_conditional.rb +4 -16
  172. data/test/test_configurator.rb +4 -16
  173. data/test/test_debug.rb +4 -16
  174. data/test/test_handlers.rb +4 -16
  175. data/test/test_http11.rb +4 -16
  176. data/test/test_redirect_handler.rb +6 -0
  177. data/test/test_request_progress.rb +58 -0
  178. data/test/test_response.rb +4 -16
  179. data/test/test_stats.rb +4 -16
  180. data/test/test_uriclassifier.rb +4 -16
  181. data/test/test_ws.rb +4 -16
  182. data/test/testhelp.rb +6 -0
  183. metadata +5 -2
@@ -1,23 +1,8 @@
1
1
  #line 1 "ext/http11/http11_parser.rl"
2
- /* Mongrel Web Server - A Mostly Ruby HTTP server and Library
3
- *
4
- * Copyright (C) 2005 Zed A. Shaw zedshaw AT zedshaw dot com
5
- *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
10
- *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2
+ /**
3
+ * Copyright (c) 2005 Zed A. Shaw
4
+ * You can redistribute it and/or modify it under the same terms as Ruby.
19
5
  */
20
-
21
6
  #include "http11_parser.h"
22
7
  #include <stdio.h>
23
8
  #include <assert.h>
@@ -30,28 +15,28 @@
30
15
  #define PTR_TO(F) (buffer + parser->F)
31
16
 
32
17
  /** machine **/
33
- #line 121 "ext/http11/http11_parser.rl"
18
+ #line 106 "ext/http11/http11_parser.rl"
34
19
 
35
20
 
36
21
  /** Data **/
37
22
 
38
- #line 39 "ext/http11/http11_parser.c"
23
+ #line 24 "ext/http11/http11_parser.c"
39
24
  static int http_parser_start = 0;
40
25
 
41
26
  static int http_parser_first_final = 51;
42
27
 
43
28
  static int http_parser_error = 1;
44
29
 
45
- #line 125 "ext/http11/http11_parser.rl"
30
+ #line 110 "ext/http11/http11_parser.rl"
46
31
 
47
32
  int http_parser_init(http_parser *parser) {
48
33
  int cs = 0;
49
34
 
50
- #line 51 "ext/http11/http11_parser.c"
35
+ #line 36 "ext/http11/http11_parser.c"
51
36
  {
52
37
  cs = http_parser_start;
53
38
  }
54
- #line 129 "ext/http11/http11_parser.rl"
39
+ #line 114 "ext/http11/http11_parser.rl"
55
40
  parser->cs = cs;
56
41
  parser->body_start = 0;
57
42
  parser->content_len = 0;
@@ -79,7 +64,7 @@ size_t http_parser_execute(http_parser *parser, const char *buffer, size_t len,
79
64
 
80
65
 
81
66
 
82
- #line 83 "ext/http11/http11_parser.c"
67
+ #line 68 "ext/http11/http11_parser.c"
83
68
  {
84
69
  p -= 1;
85
70
  if ( ++p == pe )
@@ -103,14 +88,14 @@ case 0:
103
88
  st1:
104
89
  goto _out1;
105
90
  tr14:
106
- #line 35 "ext/http11/http11_parser.rl"
91
+ #line 20 "ext/http11/http11_parser.rl"
107
92
  {MARK(mark, p); }
108
93
  goto st2;
109
94
  st2:
110
95
  if ( ++p == pe )
111
96
  goto _out2;
112
97
  case 2:
113
- #line 114 "ext/http11/http11_parser.c"
98
+ #line 99 "ext/http11/http11_parser.c"
114
99
  switch( (*p) ) {
115
100
  case 32: goto tr18;
116
101
  case 36: goto st32;
@@ -126,7 +111,7 @@ case 2:
126
111
  goto st32;
127
112
  goto st1;
128
113
  tr18:
129
- #line 48 "ext/http11/http11_parser.rl"
114
+ #line 33 "ext/http11/http11_parser.rl"
130
115
  {
131
116
  if(parser->request_method != NULL)
132
117
  parser->request_method(parser->data, PTR_TO(mark), LEN(mark, p));
@@ -136,7 +121,7 @@ st3:
136
121
  if ( ++p == pe )
137
122
  goto _out3;
138
123
  case 3:
139
- #line 140 "ext/http11/http11_parser.c"
124
+ #line 125 "ext/http11/http11_parser.c"
140
125
  switch( (*p) ) {
141
126
  case 42: goto tr10;
142
127
  case 43: goto tr11;
@@ -153,26 +138,26 @@ case 3:
153
138
  goto tr11;
154
139
  goto st1;
155
140
  tr10:
156
- #line 35 "ext/http11/http11_parser.rl"
141
+ #line 20 "ext/http11/http11_parser.rl"
157
142
  {MARK(mark, p); }
158
143
  goto st4;
159
144
  st4:
160
145
  if ( ++p == pe )
161
146
  goto _out4;
162
147
  case 4:
163
- #line 164 "ext/http11/http11_parser.c"
148
+ #line 149 "ext/http11/http11_parser.c"
164
149
  if ( (*p) == 32 )
165
150
  goto tr20;
166
151
  goto st1;
167
152
  tr20:
168
- #line 52 "ext/http11/http11_parser.rl"
153
+ #line 37 "ext/http11/http11_parser.rl"
169
154
  {
170
155
  if(parser->request_uri != NULL)
171
156
  parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
172
157
  }
173
158
  goto st5;
174
159
  tr32:
175
- #line 56 "ext/http11/http11_parser.rl"
160
+ #line 41 "ext/http11/http11_parser.rl"
176
161
  {
177
162
  if(parser->query_string != NULL)
178
163
  parser->query_string(parser->data, PTR_TO(mark), LEN(mark, p));
@@ -182,19 +167,19 @@ st5:
182
167
  if ( ++p == pe )
183
168
  goto _out5;
184
169
  case 5:
185
- #line 186 "ext/http11/http11_parser.c"
170
+ #line 171 "ext/http11/http11_parser.c"
186
171
  if ( (*p) == 72 )
187
172
  goto tr3;
188
173
  goto st1;
189
174
  tr3:
190
- #line 35 "ext/http11/http11_parser.rl"
175
+ #line 20 "ext/http11/http11_parser.rl"
191
176
  {MARK(mark, p); }
192
177
  goto st6;
193
178
  st6:
194
179
  if ( ++p == pe )
195
180
  goto _out6;
196
181
  case 6:
197
- #line 198 "ext/http11/http11_parser.c"
182
+ #line 183 "ext/http11/http11_parser.c"
198
183
  if ( (*p) == 84 )
199
184
  goto st7;
200
185
  goto st1;
@@ -252,14 +237,14 @@ case 13:
252
237
  goto st13;
253
238
  goto st1;
254
239
  tr23:
255
- #line 61 "ext/http11/http11_parser.rl"
240
+ #line 46 "ext/http11/http11_parser.rl"
256
241
  {
257
242
  if(parser->http_version != NULL)
258
243
  parser->http_version(parser->data, PTR_TO(mark), LEN(mark, p));
259
244
  }
260
245
  goto st14;
261
246
  tr35:
262
- #line 43 "ext/http11/http11_parser.rl"
247
+ #line 28 "ext/http11/http11_parser.rl"
263
248
  {
264
249
  if(parser->http_field != NULL) {
265
250
  parser->http_field(parser->data, PTR_TO(field_start), parser->field_len, PTR_TO(mark), LEN(mark, p));
@@ -270,7 +255,7 @@ st14:
270
255
  if ( ++p == pe )
271
256
  goto _out14;
272
257
  case 14:
273
- #line 274 "ext/http11/http11_parser.c"
258
+ #line 259 "ext/http11/http11_parser.c"
274
259
  if ( (*p) == 10 )
275
260
  goto st15;
276
261
  goto st1;
@@ -310,7 +295,7 @@ case 16:
310
295
  goto tr26;
311
296
  goto st1;
312
297
  tr26:
313
- #line 66 "ext/http11/http11_parser.rl"
298
+ #line 51 "ext/http11/http11_parser.rl"
314
299
  {
315
300
  parser->body_start = p - buffer + 1;
316
301
  if(parser->header_done != NULL)
@@ -322,17 +307,17 @@ st51:
322
307
  if ( ++p == pe )
323
308
  goto _out51;
324
309
  case 51:
325
- #line 326 "ext/http11/http11_parser.c"
310
+ #line 311 "ext/http11/http11_parser.c"
326
311
  goto st1;
327
312
  tr22:
328
- #line 37 "ext/http11/http11_parser.rl"
313
+ #line 22 "ext/http11/http11_parser.rl"
329
314
  { MARK(field_start, p); }
330
315
  goto st17;
331
316
  st17:
332
317
  if ( ++p == pe )
333
318
  goto _out17;
334
319
  case 17:
335
- #line 336 "ext/http11/http11_parser.c"
320
+ #line 321 "ext/http11/http11_parser.c"
336
321
  switch( (*p) ) {
337
322
  case 33: goto st17;
338
323
  case 58: goto tr16;
@@ -358,7 +343,7 @@ case 17:
358
343
  goto st17;
359
344
  goto st1;
360
345
  tr16:
361
- #line 38 "ext/http11/http11_parser.rl"
346
+ #line 23 "ext/http11/http11_parser.rl"
362
347
  {
363
348
  parser->field_len = LEN(field_start, p);
364
349
  }
@@ -367,7 +352,7 @@ st18:
367
352
  if ( ++p == pe )
368
353
  goto _out18;
369
354
  case 18:
370
- #line 371 "ext/http11/http11_parser.c"
355
+ #line 356 "ext/http11/http11_parser.c"
371
356
  if ( (*p) == 32 )
372
357
  goto st19;
373
358
  goto st1;
@@ -379,26 +364,26 @@ case 19:
379
364
  goto tr35;
380
365
  goto tr38;
381
366
  tr38:
382
- #line 42 "ext/http11/http11_parser.rl"
367
+ #line 27 "ext/http11/http11_parser.rl"
383
368
  { MARK(mark, p); }
384
369
  goto st20;
385
370
  st20:
386
371
  if ( ++p == pe )
387
372
  goto _out20;
388
373
  case 20:
389
- #line 390 "ext/http11/http11_parser.c"
374
+ #line 375 "ext/http11/http11_parser.c"
390
375
  if ( (*p) == 13 )
391
376
  goto tr35;
392
377
  goto st20;
393
378
  tr11:
394
- #line 35 "ext/http11/http11_parser.rl"
379
+ #line 20 "ext/http11/http11_parser.rl"
395
380
  {MARK(mark, p); }
396
381
  goto st21;
397
382
  st21:
398
383
  if ( ++p == pe )
399
384
  goto _out21;
400
385
  case 21:
401
- #line 402 "ext/http11/http11_parser.c"
386
+ #line 387 "ext/http11/http11_parser.c"
402
387
  switch( (*p) ) {
403
388
  case 43: goto st21;
404
389
  case 58: goto st22;
@@ -416,14 +401,14 @@ case 21:
416
401
  goto st21;
417
402
  goto st1;
418
403
  tr13:
419
- #line 35 "ext/http11/http11_parser.rl"
404
+ #line 20 "ext/http11/http11_parser.rl"
420
405
  {MARK(mark, p); }
421
406
  goto st22;
422
407
  st22:
423
408
  if ( ++p == pe )
424
409
  goto _out22;
425
410
  case 22:
426
- #line 427 "ext/http11/http11_parser.c"
411
+ #line 412 "ext/http11/http11_parser.c"
427
412
  switch( (*p) ) {
428
413
  case 32: goto tr20;
429
414
  case 37: goto st23;
@@ -464,14 +449,14 @@ case 24:
464
449
  goto st22;
465
450
  goto st1;
466
451
  tr12:
467
- #line 35 "ext/http11/http11_parser.rl"
452
+ #line 20 "ext/http11/http11_parser.rl"
468
453
  {MARK(mark, p); }
469
454
  goto st25;
470
455
  st25:
471
456
  if ( ++p == pe )
472
457
  goto _out25;
473
458
  case 25:
474
- #line 475 "ext/http11/http11_parser.c"
459
+ #line 460 "ext/http11/http11_parser.c"
475
460
  switch( (*p) ) {
476
461
  case 32: goto tr20;
477
462
  case 37: goto st26;
@@ -513,7 +498,7 @@ case 27:
513
498
  goto st25;
514
499
  goto st1;
515
500
  tr30:
516
- #line 52 "ext/http11/http11_parser.rl"
501
+ #line 37 "ext/http11/http11_parser.rl"
517
502
  {
518
503
  if(parser->request_uri != NULL)
519
504
  parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, p));
@@ -523,7 +508,7 @@ st28:
523
508
  if ( ++p == pe )
524
509
  goto _out28;
525
510
  case 28:
526
- #line 527 "ext/http11/http11_parser.c"
511
+ #line 512 "ext/http11/http11_parser.c"
527
512
  switch( (*p) ) {
528
513
  case 32: goto tr32;
529
514
  case 37: goto tr37;
@@ -538,14 +523,14 @@ case 28:
538
523
  goto st1;
539
524
  goto tr36;
540
525
  tr36:
541
- #line 35 "ext/http11/http11_parser.rl"
526
+ #line 20 "ext/http11/http11_parser.rl"
542
527
  {MARK(mark, p); }
543
528
  goto st29;
544
529
  st29:
545
530
  if ( ++p == pe )
546
531
  goto _out29;
547
532
  case 29:
548
- #line 549 "ext/http11/http11_parser.c"
533
+ #line 534 "ext/http11/http11_parser.c"
549
534
  switch( (*p) ) {
550
535
  case 32: goto tr32;
551
536
  case 37: goto st30;
@@ -560,14 +545,14 @@ case 29:
560
545
  goto st1;
561
546
  goto st29;
562
547
  tr37:
563
- #line 35 "ext/http11/http11_parser.rl"
548
+ #line 20 "ext/http11/http11_parser.rl"
564
549
  {MARK(mark, p); }
565
550
  goto st30;
566
551
  st30:
567
552
  if ( ++p == pe )
568
553
  goto _out30;
569
554
  case 30:
570
- #line 571 "ext/http11/http11_parser.c"
555
+ #line 556 "ext/http11/http11_parser.c"
571
556
  if ( (*p) < 65 ) {
572
557
  if ( 48 <= (*p) && (*p) <= 57 )
573
558
  goto st31;
@@ -976,7 +961,7 @@ case 50:
976
961
 
977
962
  _out: {}
978
963
  }
979
- #line 156 "ext/http11/http11_parser.rl"
964
+ #line 141 "ext/http11/http11_parser.rl"
980
965
 
981
966
  parser->cs = cs;
982
967
  parser->nread += p - (buffer + off);
@@ -991,8 +976,8 @@ case 50:
991
976
  if(parser->body_start) {
992
977
  /* final \r\n combo encountered so stop right here */
993
978
 
994
- #line 995 "ext/http11/http11_parser.c"
995
- #line 170 "ext/http11/http11_parser.rl"
979
+ #line 980 "ext/http11/http11_parser.c"
980
+ #line 155 "ext/http11/http11_parser.rl"
996
981
  parser->nread++;
997
982
  }
998
983
 
@@ -1004,8 +989,8 @@ int http_parser_finish(http_parser *parser)
1004
989
  int cs = parser->cs;
1005
990
 
1006
991
 
1007
- #line 1008 "ext/http11/http11_parser.c"
1008
- #line 181 "ext/http11/http11_parser.rl"
992
+ #line 993 "ext/http11/http11_parser.c"
993
+ #line 166 "ext/http11/http11_parser.rl"
1009
994
 
1010
995
  parser->cs = cs;
1011
996
 
@@ -1,20 +1,6 @@
1
- /* Mongrel Web Server - A Mostly Ruby HTTP server and Library
2
- *
3
- * Copyright (C) 2005 Zed A. Shaw zedshaw AT zedshaw dot com
4
- *
5
- * This library is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU Lesser General Public
7
- * License as published by the Free Software Foundation; either
8
- * version 2.1 of the License, or (at your option) any later version.
9
- *
10
- * This library is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this library; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1
+ /**
2
+ * Copyright (c) 2005 Zed A. Shaw
3
+ * You can redistribute it and/or modify it under the same terms as Ruby.
18
4
  */
19
5
 
20
6
  #ifndef http11_parser_h
Binary file
@@ -1,20 +1,8 @@
1
- # Mongrel Web Server - A Mostly Ruby HTTP server and Library
1
+ # Copyright (c) 2005 Zed A. Shaw
2
+ # You can redistribute it and/or modify it under the same terms as Ruby.
2
3
  #
3
- # Copyright (C) 2005 Zed A. Shaw zedshaw AT zedshaw dot com
4
- #
5
- # This library is free software; you can redistribute it and/or
6
- # modify it under the terms of the GNU Lesser General Public
7
- # License as published by the Free Software Foundation; either
8
- # version 2.1 of the License, or (at your option) any later version.
9
- #
10
- # This library is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- # Lesser General Public License for more details.
14
- #
15
- # You should have received a copy of the GNU Lesser General Public
16
- # License along with this library; if not, write to the Free Software
17
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4
+ # Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html
5
+ # for more information.
18
6
 
19
7
  require 'socket'
20
8
  require 'http11'
@@ -132,7 +120,7 @@ module Mongrel
132
120
  # The original URI requested by the client. Passed to URIClassifier to build PATH_INFO and SCRIPT_NAME.
133
121
  REQUEST_URI='REQUEST_URI'.freeze
134
122
 
135
- MONGREL_VERSION="0.3.13.2".freeze
123
+ MONGREL_VERSION="0.3.13.3".freeze
136
124
 
137
125
  # TODO: this use of a base for tempfiles needs to be looked at for security problems
138
126
  MONGREL_TMP_BASE="mongrel".freeze
@@ -425,7 +413,7 @@ module Mongrel
425
413
  write(chunk)
426
414
  end
427
415
  end
428
- @body_send = true
416
+ @body_sent = true
429
417
  end
430
418
  end
431
419
 
@@ -646,7 +634,6 @@ module Mongrel
646
634
  reap_dead_workers("max processors")
647
635
  else
648
636
  thread = Thread.new { process_client(client) }
649
-
650
637
  thread.abort_on_exception = true
651
638
  thread[:started_on] = Time.now
652
639
  @workers.add(thread)
@@ -1008,21 +995,21 @@ module Mongrel
1008
995
  # debug "/", what = [:rails]
1009
996
  #
1010
997
  # And it will only produce the log/mongrel_debug/rails.log file.
1011
- # Available options are: :object, :rails, :files, :threads, :params
998
+ # Available options are: :objects, :rails, :files, :threads, :params
1012
999
  #
1013
1000
  # NOTE: Use [:files] to get accesses dumped to stderr like with WEBrick.
1014
- def debug(location, what = [:object, :rails, :files, :threads, :params])
1001
+ def debug(location, what = [:objects, :rails, :files, :threads, :params])
1015
1002
  require 'mongrel/debug'
1016
1003
  handlers = {
1017
1004
  :files => "/handlers/requestlog::access",
1018
1005
  :rails => "/handlers/requestlog::files",
1019
- :object => "/handlers/requestlog::objects",
1006
+ :objects => "/handlers/requestlog::objects",
1020
1007
  :threads => "/handlers/requestlog::threads",
1021
1008
  :params => "/handlers/requestlog::params"
1022
1009
  }
1023
1010
 
1024
1011
  # turn on the debugging infrastructure, and ObjectTracker is a pig
1025
- ObjectTracker.configure if what.include? :object
1012
+ ObjectTracker.configure if what.include? :objects
1026
1013
  MongrelDbg.configure
1027
1014
 
1028
1015
  # now we roll through each requested debug type, turn it on and load that plugin