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.
- data/COPYING +39 -488
- data/LICENSE +39 -488
- data/Rakefile +1 -1
- data/bin/mongrel_rails +8 -0
- data/doc/rdoc/classes/IO.src/M000001.html +5 -5
- data/doc/rdoc/classes/IO.src/M000002.html +5 -5
- data/doc/rdoc/classes/Kernel.src/M000020.html +5 -5
- data/doc/rdoc/classes/Kernel.src/M000021.html +9 -9
- data/doc/rdoc/classes/Mongrel.html +4 -22
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +10 -10
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +33 -33
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +20 -20
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +13 -13
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000105.html +11 -11
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000107.html +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000108.html +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000109.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +8 -8
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +4 -4
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +36 -36
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +10 -10
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +28 -28
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +8 -8
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +10 -10
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +10 -10
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +6 -6
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +33 -33
- data/doc/rdoc/classes/Mongrel/Configurator.html +2 -2
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +13 -13
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +17 -17
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +6 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +9 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +23 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +16 -16
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +18 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +10 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +8 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +11 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +21 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000128.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000129.html +19 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000130.html +4 -4
- data/doc/rdoc/classes/Mongrel/Const.html +1 -1
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000099.html +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000100.html +14 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +7 -7
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +28 -28
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +48 -48
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +25 -25
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000131.html +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000132.html +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000072.html +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000073.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000078.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000079.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000080.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000025.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +42 -42
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000139.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000140.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000141.html +18 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +17 -17
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000089.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000090.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000091.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000092.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +71 -71
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +17 -17
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +36 -37
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +20 -20
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +8 -8
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +25 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +11 -11
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +12 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +8 -8
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +36 -36
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +9 -9
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000136.html +8 -8
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000137.html +13 -13
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000133.html +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000134.html +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000135.html +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +10 -10
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000076.html +28 -28
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000077.html +6 -6
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +4 -4
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +4 -4
- data/doc/rdoc/classes/MongrelDbg.src/M000015.html +5 -5
- data/doc/rdoc/classes/MongrelDbg.src/M000016.html +6 -6
- data/doc/rdoc/classes/MongrelDbg.src/M000017.html +8 -8
- data/doc/rdoc/classes/MongrelDbg.src/M000018.html +7 -7
- data/doc/rdoc/classes/MongrelDbg.src/M000019.html +4 -4
- data/doc/rdoc/classes/ObjectTracker.src/M000013.html +13 -13
- data/doc/rdoc/classes/ObjectTracker.src/M000014.html +30 -30
- data/doc/rdoc/classes/RequestLog/Access.src/M000142.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/M000143.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/M000145.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/M000146.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/M000144.html +20 -20
- data/doc/rdoc/classes/Stats.src/M000005.html +5 -5
- data/doc/rdoc/classes/Stats.src/M000006.html +9 -9
- data/doc/rdoc/classes/Stats.src/M000007.html +12 -12
- data/doc/rdoc/classes/Stats.src/M000008.html +4 -4
- data/doc/rdoc/classes/Stats.src/M000009.html +4 -4
- data/doc/rdoc/classes/Stats.src/M000010.html +4 -4
- data/doc/rdoc/classes/Stats.src/M000011.html +9 -9
- data/doc/rdoc/classes/Stats.src/M000012.html +6 -6
- data/doc/rdoc/classes/TCPServer.src/M000003.html +5 -5
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +51 -639
- data/doc/rdoc/files/LICENSE.html +51 -639
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/camping_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/command_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +13 -1
- data/doc/rdoc/files/lib/mongrel/init_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel_rb.html +6 -21
- data/ext/http11/http11.c +4 -19
- data/ext/http11/http11_parser.c +48 -63
- data/ext/http11/http11_parser.h +3 -17
- data/lib/http11.so +0 -0
- data/lib/mongrel.rb +10 -23
- data/lib/mongrel/camping.rb +4 -16
- data/lib/mongrel/cgi.rb +4 -16
- data/lib/mongrel/command.rb +4 -16
- data/lib/mongrel/debug.rb +4 -16
- data/lib/mongrel/handlers.rb +6 -17
- data/lib/mongrel/init.rb +4 -16
- data/lib/mongrel/rails.rb +4 -16
- data/lib/mongrel/stats.rb +4 -16
- data/lib/mongrel/tcphack.rb +4 -16
- data/test/test_command.rb +4 -16
- data/test/test_conditional.rb +4 -16
- data/test/test_configurator.rb +4 -16
- data/test/test_debug.rb +4 -16
- data/test/test_handlers.rb +4 -16
- data/test/test_http11.rb +4 -16
- data/test/test_redirect_handler.rb +6 -0
- data/test/test_request_progress.rb +58 -0
- data/test/test_response.rb +4 -16
- data/test/test_stats.rb +4 -16
- data/test/test_uriclassifier.rb +4 -16
- data/test/test_ws.rb +4 -16
- data/test/testhelp.rb +6 -0
- metadata +5 -2
data/ext/http11/http11_parser.c
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
#line 1 "ext/http11/http11_parser.rl"
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
|
18
|
+
#line 106 "ext/http11/http11_parser.rl"
|
|
34
19
|
|
|
35
20
|
|
|
36
21
|
/** Data **/
|
|
37
22
|
|
|
38
|
-
#line
|
|
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
|
|
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
|
|
35
|
+
#line 36 "ext/http11/http11_parser.c"
|
|
51
36
|
{
|
|
52
37
|
cs = http_parser_start;
|
|
53
38
|
}
|
|
54
|
-
#line
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
310
|
+
#line 311 "ext/http11/http11_parser.c"
|
|
326
311
|
goto st1;
|
|
327
312
|
tr22:
|
|
328
|
-
#line
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
#line
|
|
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
|
-
#line
|
|
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
|
|
data/ext/http11/http11_parser.h
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
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
|
data/lib/http11.so
ADDED
|
Binary file
|
data/lib/mongrel.rb
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
#
|
|
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
|
-
#
|
|
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.
|
|
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
|
-
@
|
|
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: :
|
|
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 = [:
|
|
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
|
-
:
|
|
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? :
|
|
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
|