mongrel 0.3.10.1 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/Rakefile +14 -2
  2. data/bin/mongrel_rails +7 -1
  3. data/bin/mongrel_rails_service +4 -4
  4. data/lib/mongrel.rb +5 -6
  5. data/tools/rakehelp.rb +4 -2
  6. metadata +3 -134
  7. data/doc/rdoc/classes/Mongrel.html +0 -175
  8. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +0 -381
  9. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000057.html +0 -24
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000058.html +0 -47
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000059.html +0 -34
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000060.html +0 -27
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000061.html +0 -25
  14. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000062.html +0 -18
  15. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000063.html +0 -18
  16. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000064.html +0 -18
  17. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000065.html +0 -19
  18. data/doc/rdoc/classes/Mongrel/Camping.html +0 -177
  19. data/doc/rdoc/classes/Mongrel/Camping.src/M000019.html +0 -22
  20. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +0 -165
  21. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000020.html +0 -18
  22. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000021.html +0 -27
  23. data/doc/rdoc/classes/Mongrel/Command.html +0 -119
  24. data/doc/rdoc/classes/Mongrel/Command/Base.html +0 -332
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000006.html +0 -24
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000007.html +0 -41
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000008.html +0 -18
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000009.html +0 -18
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000010.html +0 -18
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000011.html +0 -22
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000012.html +0 -18
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000013.html +0 -18
  33. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000014.html +0 -18
  34. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000015.html +0 -18
  35. data/doc/rdoc/classes/Mongrel/Command/Registry.html +0 -192
  36. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000016.html +0 -20
  37. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000017.html +0 -25
  38. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000018.html +0 -46
  39. data/doc/rdoc/classes/Mongrel/Const.html +0 -352
  40. data/doc/rdoc/classes/Mongrel/DirHandler.html +0 -283
  41. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000029.html +0 -20
  42. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000030.html +0 -42
  43. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000031.html +0 -40
  44. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000032.html +0 -31
  45. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000033.html +0 -38
  46. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000034.html +0 -18
  47. data/doc/rdoc/classes/Mongrel/Error404Handler.html +0 -171
  48. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000066.html +0 -18
  49. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000067.html +0 -18
  50. data/doc/rdoc/classes/Mongrel/HeaderOut.html +0 -185
  51. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000041.html +0 -18
  52. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000042.html +0 -21
  53. data/doc/rdoc/classes/Mongrel/HttpHandler.html +0 -146
  54. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000043.html +0 -17
  55. data/doc/rdoc/classes/Mongrel/HttpParser.html +0 -271
  56. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000022.html +0 -28
  57. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000023.html +0 -29
  58. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000024.html +0 -29
  59. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000025.html +0 -41
  60. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000026.html +0 -27
  61. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000027.html +0 -27
  62. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000028.html +0 -28
  63. data/doc/rdoc/classes/Mongrel/HttpRequest.html +0 -177
  64. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000068.html +0 -39
  65. data/doc/rdoc/classes/Mongrel/HttpResponse.html +0 -321
  66. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000044.html +0 -21
  67. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000045.html +0 -20
  68. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000046.html +0 -19
  69. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000047.html +0 -19
  70. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000048.html +0 -20
  71. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000049.html +0 -20
  72. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000050.html +0 -20
  73. data/doc/rdoc/classes/Mongrel/HttpServer.html +0 -310
  74. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000035.html +0 -36
  75. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000036.html +0 -57
  76. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000037.html +0 -48
  77. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000038.html +0 -18
  78. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000039.html +0 -18
  79. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000040.html +0 -23
  80. data/doc/rdoc/classes/Mongrel/StopServer.html +0 -117
  81. data/doc/rdoc/classes/Mongrel/TimeoutWorker.html +0 -117
  82. data/doc/rdoc/classes/Mongrel/URIClassifier.html +0 -301
  83. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000051.html +0 -18
  84. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000052.html +0 -18
  85. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000053.html +0 -39
  86. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000054.html +0 -51
  87. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000055.html +0 -36
  88. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000056.html +0 -83
  89. data/doc/rdoc/classes/RailsHandler.html +0 -245
  90. data/doc/rdoc/classes/RailsHandler.src/M000003.html +0 -22
  91. data/doc/rdoc/classes/RailsHandler.src/M000004.html +0 -48
  92. data/doc/rdoc/classes/RailsHandler.src/M000005.html +0 -23
  93. data/doc/rdoc/classes/TCPServer.html +0 -173
  94. data/doc/rdoc/classes/TCPServer.src/M000001.html +0 -19
  95. data/doc/rdoc/created.rid +0 -1
  96. data/doc/rdoc/files/COPYING.html +0 -756
  97. data/doc/rdoc/files/LICENSE.html +0 -756
  98. data/doc/rdoc/files/README.html +0 -302
  99. data/doc/rdoc/files/ext/http11/http11_c.html +0 -101
  100. data/doc/rdoc/files/lib/mongrel/camping_rb.html +0 -108
  101. data/doc/rdoc/files/lib/mongrel/cgi_rb.html +0 -108
  102. data/doc/rdoc/files/lib/mongrel/command_rb.html +0 -111
  103. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +0 -101
  104. data/doc/rdoc/files/lib/mongrel/init_rb.html +0 -109
  105. data/doc/rdoc/files/lib/mongrel/rails_rb.html +0 -109
  106. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +0 -109
  107. data/doc/rdoc/files/lib/mongrel_rb.html +0 -116
  108. data/doc/rdoc/fr_class_index.html +0 -47
  109. data/doc/rdoc/fr_file_index.html +0 -38
  110. data/doc/rdoc/fr_method_index.html +0 -94
  111. data/doc/rdoc/index.html +0 -24
  112. data/doc/rdoc/rdoc-style.css +0 -208
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>run (Mongrel::Command::Registry)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 137</span>
14
- 137: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">args</span>)
15
- 138: <span class="ruby-comment cmt"># find the command</span>
16
- 139: <span class="ruby-identifier">cmd_name</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
17
- 140:
18
- 141: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">cmd_name</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">cmd_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;?&quot;</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">cmd_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;help&quot;</span>
19
- 142: <span class="ruby-identifier">print_command_list</span>
20
- 143: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
21
- 144: <span class="ruby-keyword kw">end</span>
22
- 145:
23
- 146: <span class="ruby-comment cmt"># command exists, set it up and validate it</span>
24
- 147: <span class="ruby-keyword kw">begin</span>
25
- 148: <span class="ruby-identifier">command</span> = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">Manager</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">create</span>(<span class="ruby-node">&quot;/commands/#{cmd_name}&quot;</span>, <span class="ruby-identifier">:argv</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">args</span>)
26
- 149: <span class="ruby-keyword kw">rescue</span>
27
- 150: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;INVALID COMMAND: #$!&quot;</span>
28
- 151: <span class="ruby-identifier">print_command_list</span>
29
- 152: <span class="ruby-keyword kw">return</span>
30
- 153: <span class="ruby-keyword kw">end</span>
31
- 154:
32
- 155: <span class="ruby-comment cmt"># Normally the command is NOT valid right after being created</span>
33
- 156: <span class="ruby-comment cmt"># but sometimes (like with -h or -v) there's no further processing</span>
34
- 157: <span class="ruby-comment cmt"># needed so the command is already valid so we can skip it.</span>
35
- 158: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">command</span>.<span class="ruby-identifier">done_validating</span>
36
- 159: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">command</span>.<span class="ruby-identifier">validate</span>
37
- 160: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{cmd_name} reported an error. Use -h to get help.&quot;</span>
38
- 161: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
39
- 162: <span class="ruby-keyword kw">else</span>
40
- 163: <span class="ruby-identifier">command</span>.<span class="ruby-identifier">run</span>
41
- 164: <span class="ruby-keyword kw">end</span>
42
- 165: <span class="ruby-keyword kw">end</span>
43
- 166: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
44
- 167: <span class="ruby-keyword kw">end</span></pre>
45
- </body>
46
- </html>
@@ -1,352 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Mongrel::Const</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Mongrel::Const</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/mongrel_rb.html">
59
- lib/mongrel.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- Frequently used constants when constructing requests or responses. Many
78
- times the constant just refers to a string with the same contents. Using
79
- these constants gave about a 3% to 10% performance improvement over using
80
- the strings directly. Symbols did not really improve things much compared
81
- to constants.
82
- </p>
83
- <p>
84
- While <a href="../Mongrel.html">Mongrel</a> does try to emulate the CGI/1.2
85
- protocol, it does not use the REMOTE_IDENT, REMOTE_USER, or REMOTE_HOST
86
- parameters since those are either a security problem or too taxing on
87
- performance.
88
- </p>
89
-
90
- </div>
91
-
92
-
93
- </div>
94
-
95
-
96
- </div>
97
-
98
-
99
- <!-- if includes -->
100
-
101
- <div id="section">
102
-
103
-
104
- <div id="constants-list">
105
- <h3 class="section-bar">Constants</h3>
106
-
107
- <div class="name-list">
108
- <table summary="Constants">
109
- <tr class="top-aligned-row context-row">
110
- <td class="context-item-name">PATH_INFO</td>
111
- <td>=</td>
112
- <td class="context-item-value">&quot;PATH_INFO&quot;</td>
113
- <td width="3em">&nbsp;</td>
114
- <td class="context-item-desc">
115
- This is the part of the path after the SCRIPT_NAME. <a
116
- href="URIClassifier.html">URIClassifier</a> will determine this.
117
-
118
- </td>
119
- </tr>
120
- <tr class="top-aligned-row context-row">
121
- <td class="context-item-name">SCRIPT_NAME</td>
122
- <td>=</td>
123
- <td class="context-item-value">&quot;SCRIPT_NAME&quot;</td>
124
- <td width="3em">&nbsp;</td>
125
- <td class="context-item-desc">
126
- This is the intial part that your handler is identified as by <a
127
- href="URIClassifier.html">URIClassifier</a>.
128
-
129
- </td>
130
- </tr>
131
- <tr class="top-aligned-row context-row">
132
- <td class="context-item-name">REQUEST_URI</td>
133
- <td>=</td>
134
- <td class="context-item-value">'REQUEST_URI'</td>
135
- <td width="3em">&nbsp;</td>
136
- <td class="context-item-desc">
137
- The original URI requested by the client. Passed to <a
138
- href="URIClassifier.html">URIClassifier</a> to build PATH_INFO and
139
- SCRIPT_NAME.
140
-
141
- </td>
142
- </tr>
143
- <tr class="top-aligned-row context-row">
144
- <td class="context-item-name">CONTENT_LENGTH</td>
145
- <td>=</td>
146
- <td class="context-item-value">'CONTENT_LENGTH'</td>
147
- <td width="3em">&nbsp;</td>
148
- <td class="context-item-desc">
149
- Content length (also available as HTTP_CONTENT_LENGTH).
150
-
151
- </td>
152
- </tr>
153
- <tr class="top-aligned-row context-row">
154
- <td class="context-item-name">HTTP_CONTENT_LENGTH</td>
155
- <td>=</td>
156
- <td class="context-item-value">'HTTP_CONTENT_LENGTH'</td>
157
- <td width="3em">&nbsp;</td>
158
- <td class="context-item-desc">
159
- Content length (also available as CONTENT_LENGTH).
160
-
161
- </td>
162
- </tr>
163
- <tr class="top-aligned-row context-row">
164
- <td class="context-item-name">CONTENT_TYPE</td>
165
- <td>=</td>
166
- <td class="context-item-value">'CONTENT_TYPE'</td>
167
- <td width="3em">&nbsp;</td>
168
- <td class="context-item-desc">
169
- Content type (also available as HTTP_CONTENT_TYPE).
170
-
171
- </td>
172
- </tr>
173
- <tr class="top-aligned-row context-row">
174
- <td class="context-item-name">HTTP_CONTENT_TYPE</td>
175
- <td>=</td>
176
- <td class="context-item-value">'HTTP_CONTENT_TYPE'</td>
177
- <td width="3em">&nbsp;</td>
178
- <td class="context-item-desc">
179
- Content type (also available as CONTENT_TYPE).
180
-
181
- </td>
182
- </tr>
183
- <tr class="top-aligned-row context-row">
184
- <td class="context-item-name">GATEWAY_INTERFACE</td>
185
- <td>=</td>
186
- <td class="context-item-value">'GATEWAY_INTERFACE'</td>
187
- <td width="3em">&nbsp;</td>
188
- <td class="context-item-desc">
189
- Gateway interface key in the <a href="HttpRequest.html">HttpRequest</a>
190
- parameters.
191
-
192
- </td>
193
- </tr>
194
- <tr class="top-aligned-row context-row">
195
- <td class="context-item-name">GATEWAY_INTERFACE_VALUE</td>
196
- <td>=</td>
197
- <td class="context-item-value">'CGI/1.2'</td>
198
- <td width="3em">&nbsp;</td>
199
- <td class="context-item-desc">
200
- We claim to support CGI/1.2.
201
-
202
- </td>
203
- </tr>
204
- <tr class="top-aligned-row context-row">
205
- <td class="context-item-name">REMOTE_ADDR</td>
206
- <td>=</td>
207
- <td class="context-item-value">'REMOTE_ADDR'</td>
208
- <td width="3em">&nbsp;</td>
209
- <td class="context-item-desc">
210
- Hosts remote IP address. <a href="../Mongrel.html">Mongrel</a> does not do
211
- DNS resolves since that slows processing down considerably.
212
-
213
- </td>
214
- </tr>
215
- <tr class="top-aligned-row context-row">
216
- <td class="context-item-name">REMOTE_HOST</td>
217
- <td>=</td>
218
- <td class="context-item-value">'REMOTE_HOST'</td>
219
- <td width="3em">&nbsp;</td>
220
- <td class="context-item-desc">
221
- This is not given since <a href="../Mongrel.html">Mongrel</a> does not do
222
- DNS resolves. It is only here for completeness for the CGI standard.
223
-
224
- </td>
225
- </tr>
226
- <tr class="top-aligned-row context-row">
227
- <td class="context-item-name">SERVER_NAME</td>
228
- <td>=</td>
229
- <td class="context-item-value">'SERVER_NAME'</td>
230
- <td width="3em">&nbsp;</td>
231
- <td class="context-item-desc">
232
- The name/host of our server as given by the <a
233
- href="HttpServer.html#M000035">HttpServer.new</a>(host,port) call.
234
-
235
- </td>
236
- </tr>
237
- <tr class="top-aligned-row context-row">
238
- <td class="context-item-name">SERVER_PORT</td>
239
- <td>=</td>
240
- <td class="context-item-value">'SERVER_PORT'</td>
241
- <td width="3em">&nbsp;</td>
242
- <td class="context-item-desc">
243
- The port of our server as given by the <a
244
- href="HttpServer.html#M000035">HttpServer.new</a>(host,port) call.
245
-
246
- </td>
247
- </tr>
248
- <tr class="top-aligned-row context-row">
249
- <td class="context-item-name">HTTP_HOST</td>
250
- <td>=</td>
251
- <td class="context-item-value">'HTTP_HOST'</td>
252
- <td width="3em">&nbsp;</td>
253
- <td class="context-item-desc">
254
- SERVER_NAME and SERVER_PORT come from this.
255
-
256
- </td>
257
- </tr>
258
- <tr class="top-aligned-row context-row">
259
- <td class="context-item-name">SERVER_PROTOCOL</td>
260
- <td>=</td>
261
- <td class="context-item-value">'SERVER_PROTOCOL'</td>
262
- <td width="3em">&nbsp;</td>
263
- <td class="context-item-desc">
264
- Official server protocol key in the <a
265
- href="HttpRequest.html">HttpRequest</a> parameters.
266
-
267
- </td>
268
- </tr>
269
- <tr class="top-aligned-row context-row">
270
- <td class="context-item-name">SERVER_PROTOCOL_VALUE</td>
271
- <td>=</td>
272
- <td class="context-item-value">'HTTP/1.1'</td>
273
- <td width="3em">&nbsp;</td>
274
- <td class="context-item-desc">
275
- <a href="../Mongrel.html">Mongrel</a> claims to support HTTP/1.1.
276
-
277
- </td>
278
- </tr>
279
- <tr class="top-aligned-row context-row">
280
- <td class="context-item-name">SERVER_SOFTWARE</td>
281
- <td>=</td>
282
- <td class="context-item-value">'SERVER_SOFTWARE'</td>
283
- <td width="3em">&nbsp;</td>
284
- <td class="context-item-desc">
285
- The actual server software being used (it&#8217;s <a
286
- href="../Mongrel.html">Mongrel</a> man).
287
-
288
- </td>
289
- </tr>
290
- <tr class="top-aligned-row context-row">
291
- <td class="context-item-name">MONGREL_VERSION</td>
292
- <td>=</td>
293
- <td class="context-item-value">'Mongrel 0.3.10'</td>
294
- <td width="3em">&nbsp;</td>
295
- <td class="context-item-desc">
296
- Current <a href="../Mongrel.html">Mongrel</a> version (used for
297
- SERVER_SOFTWARE and other response headers).
298
-
299
- </td>
300
- </tr>
301
- <tr class="top-aligned-row context-row">
302
- <td class="context-item-name">ERROR_404_RESPONSE</td>
303
- <td>=</td>
304
- <td class="context-item-value">&quot;HTTP/1.1 404 Not Found\r\nConnection: close\r\nServer: #{MONGREL_VERSION}\r\n\r\nNOT FOUND&quot;</td>
305
- <td width="3em">&nbsp;</td>
306
- <td class="context-item-desc">
307
- The standard empty 404 response for bad requests. Use Error4040Handler for
308
- custom stuff.
309
-
310
- </td>
311
- </tr>
312
- <tr class="top-aligned-row context-row">
313
- <td class="context-item-name">ERROR_503_RESPONSE</td>
314
- <td>=</td>
315
- <td class="context-item-value">&quot;HTTP/1.1 503 Service Unavailable\r\n\r\nBUSY&quot;</td>
316
- <td width="3em">&nbsp;</td>
317
- <td class="context-item-desc">
318
- A common header for indicating the server is too busy. Not used yet.
319
-
320
- </td>
321
- </tr>
322
- <tr class="top-aligned-row context-row">
323
- <td class="context-item-name">CHUNK_SIZE</td>
324
- <td>=</td>
325
- <td class="context-item-value">(16 * 1024)</td>
326
- <td width="3em">&nbsp;</td>
327
- <td class="context-item-desc">
328
- The basic max request size we&#8217;ll try to read.
329
-
330
- </td>
331
- </tr>
332
- </table>
333
- </div>
334
- </div>
335
-
336
-
337
-
338
-
339
-
340
-
341
- <!-- if method_list -->
342
-
343
-
344
- </div>
345
-
346
-
347
- <div id="validator-badges">
348
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
349
- </div>
350
-
351
- </body>
352
- </html>
@@ -1,283 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Mongrel::DirHandler</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Mongrel::DirHandler</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/mongrel/handlers_rb.html">
59
- lib/mongrel/handlers.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="HttpHandler.html">
69
- HttpHandler
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- Serves the contents of a directory. You give it the path to the root where
86
- the files are located, and it tries to find the files based on the
87
- PATH_INFO inside the directory. If the requested path is a directory then
88
- it returns a simple directory listing.
89
- </p>
90
- <p>
91
- It does a simple protection against going outside it&#8217;s root path by
92
- converting all paths to an absolute expanded path, and then making sure
93
- that the final expanded path includes the root path. If it doesn&#8217;t
94
- than it simply gives a 404.
95
- </p>
96
-
97
- </div>
98
-
99
-
100
- </div>
101
-
102
- <div id="method-list">
103
- <h3 class="section-bar">Methods</h3>
104
-
105
- <div class="name-list">
106
- <a href="#M000034">add_mime_type</a>&nbsp;&nbsp;
107
- <a href="#M000030">can_serve</a>&nbsp;&nbsp;
108
- <a href="#M000029">new</a>&nbsp;&nbsp;
109
- <a href="#M000033">process</a>&nbsp;&nbsp;
110
- <a href="#M000031">send_dir_listing</a>&nbsp;&nbsp;
111
- <a href="#M000032">send_file</a>&nbsp;&nbsp;
112
- </div>
113
- </div>
114
-
115
- </div>
116
-
117
-
118
- <!-- if includes -->
119
-
120
- <div id="section">
121
-
122
-
123
- <div id="constants-list">
124
- <h3 class="section-bar">Constants</h3>
125
-
126
- <div class="name-list">
127
- <table summary="Constants">
128
- <tr class="top-aligned-row context-row">
129
- <td class="context-item-name">MIME_TYPES</td>
130
- <td>=</td>
131
- <td class="context-item-value">{ &quot;.css&quot; =&gt; &quot;text/css&quot;, &quot;.gif&quot; =&gt; &quot;image/gif&quot;, &quot;.htm&quot; =&gt; &quot;text/html&quot;, &quot;.html&quot; =&gt; &quot;text/html&quot;, &quot;.jpeg&quot; =&gt; &quot;image/jpeg&quot;, &quot;.jpg&quot; =&gt; &quot;image/jpeg&quot;, &quot;.js&quot; =&gt; &quot;text/javascript&quot;, &quot;.png&quot; =&gt; &quot;image/png&quot;, &quot;.swf&quot; =&gt; &quot;application/x-shockwave-flash&quot;, &quot;.txt&quot; =&gt; &quot;text/plain&quot;</td>
132
- </tr>
133
- </table>
134
- </div>
135
- </div>
136
-
137
-
138
-
139
- <div id="attribute-list">
140
- <h3 class="section-bar">Attributes</h3>
141
-
142
- <div class="name-list">
143
- <table>
144
- <tr class="top-aligned-row context-row">
145
- <td class="context-item-name">path</td>
146
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
147
- <td class="context-item-desc"></td>
148
- </tr>
149
- </table>
150
- </div>
151
- </div>
152
-
153
-
154
-
155
- <!-- if method_list -->
156
- <div id="methods">
157
- <h3 class="section-bar">Public Class methods</h3>
158
-
159
- <div id="method-M000034" class="method-detail">
160
- <a name="M000034"></a>
161
-
162
- <div class="method-heading">
163
- <a href="DirHandler.src/M000034.html" target="Code" class="method-signature"
164
- onclick="popupCode('DirHandler.src/M000034.html');return false;">
165
- <span class="method-name">add_mime_type</span><span class="method-args">(extension, type)</span>
166
- </a>
167
- </div>
168
-
169
- <div class="method-description">
170
- <p>
171
- There is a small number of default mime types for extensions, but this lets
172
- you add any others you&#8217;ll need when serving content.
173
- </p>
174
- </div>
175
- </div>
176
-
177
- <div id="method-M000029" class="method-detail">
178
- <a name="M000029"></a>
179
-
180
- <div class="method-heading">
181
- <a href="DirHandler.src/M000029.html" target="Code" class="method-signature"
182
- onclick="popupCode('DirHandler.src/M000029.html');return false;">
183
- <span class="method-name">new</span><span class="method-args">(path, listing_allowed=true, index_html=&quot;index.html&quot;)</span>
184
- </a>
185
- </div>
186
-
187
- <div class="method-description">
188
- <p>
189
- You give it the path to the directory root and an (optional)
190
- </p>
191
- </div>
192
- </div>
193
-
194
- <h3 class="section-bar">Public Instance methods</h3>
195
-
196
- <div id="method-M000030" class="method-detail">
197
- <a name="M000030"></a>
198
-
199
- <div class="method-heading">
200
- <a href="DirHandler.src/M000030.html" target="Code" class="method-signature"
201
- onclick="popupCode('DirHandler.src/M000030.html');return false;">
202
- <span class="method-name">can_serve</span><span class="method-args">(path_info)</span>
203
- </a>
204
- </div>
205
-
206
- <div class="method-description">
207
- <p>
208
- Checks if the given path can be served and returns the full path (or nil if
209
- not).
210
- </p>
211
- </div>
212
- </div>
213
-
214
- <div id="method-M000033" class="method-detail">
215
- <a name="M000033"></a>
216
-
217
- <div class="method-heading">
218
- <a href="DirHandler.src/M000033.html" target="Code" class="method-signature"
219
- onclick="popupCode('DirHandler.src/M000033.html');return false;">
220
- <span class="method-name">process</span><span class="method-args">(request, response)</span>
221
- </a>
222
- </div>
223
-
224
- <div class="method-description">
225
- <p>
226
- Process the request to either serve a file or a directory listing if
227
- allowed (based on the listing_allowed paramter to the constructor).
228
- </p>
229
- </div>
230
- </div>
231
-
232
- <div id="method-M000031" class="method-detail">
233
- <a name="M000031"></a>
234
-
235
- <div class="method-heading">
236
- <a href="DirHandler.src/M000031.html" target="Code" class="method-signature"
237
- onclick="popupCode('DirHandler.src/M000031.html');return false;">
238
- <span class="method-name">send_dir_listing</span><span class="method-args">(base, dir, response)</span>
239
- </a>
240
- </div>
241
-
242
- <div class="method-description">
243
- <p>
244
- Returns a simplistic directory listing if they&#8217;re enabled, otherwise
245
- a 403. Base is the base URI from the REQUEST_URI, dir is the directory to
246
- serve on the file system (comes from <a
247
- href="DirHandler.html#M000030">can_serve</a>()), and response is the <a
248
- href="HttpResponse.html">HttpResponse</a> object to send the results on.
249
- </p>
250
- </div>
251
- </div>
252
-
253
- <div id="method-M000032" class="method-detail">
254
- <a name="M000032"></a>
255
-
256
- <div class="method-heading">
257
- <a href="DirHandler.src/M000032.html" target="Code" class="method-signature"
258
- onclick="popupCode('DirHandler.src/M000032.html');return false;">
259
- <span class="method-name">send_file</span><span class="method-args">(req, response)</span>
260
- </a>
261
- </div>
262
-
263
- <div class="method-description">
264
- <p>
265
- Sends the contents of a file back to the user. Not terribly efficient since
266
- it&#8217;s opening and closing the file for each read.
267
- </p>
268
- </div>
269
- </div>
270
-
271
-
272
- </div>
273
-
274
-
275
- </div>
276
-
277
-
278
- <div id="validator-badges">
279
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
280
- </div>
281
-
282
- </body>
283
- </html>