mongrel 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README +30 -24
- data/Rakefile +12 -2
- data/bin/mongrel_rails +12 -8
- data/doc/rdoc/classes/Mongrel.html +18 -1
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +381 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000051.html +24 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000052.html +47 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000053.html +34 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000054.html +27 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000055.html +25 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000056.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000057.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000058.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000059.html +19 -0
- data/doc/rdoc/classes/Mongrel/Command.html +119 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +332 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000003.html +24 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000004.html +41 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000005.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000006.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000007.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000008.html +22 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000009.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000010.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000011.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000012.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +192 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000013.html +20 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000014.html +25 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000015.html +46 -0
- data/doc/rdoc/classes/Mongrel/Const.html +2 -2
- data/doc/rdoc/classes/Mongrel/DirHandler.html +283 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000023.html +20 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000024.html +42 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000025.html +40 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000026.html +31 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000027.html +38 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000028.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +171 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000060.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000061.html +18 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000014.html → M000035.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000015.html → M000036.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +146 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000037.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000001.html → M000016.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000002.html → M000017.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000003.html → M000018.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000004.html → M000019.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000005.html → M000020.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000006.html → M000021.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000007.html → M000022.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000029.html → M000062.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +36 -36
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000016.html → M000038.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000017.html → M000039.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000018.html → M000040.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000019.html → M000041.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000020.html → M000042.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000021.html → M000043.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000022.html → M000044.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.html +33 -33
- data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000008.html → M000029.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000009.html → M000030.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000010.html → M000031.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000011.html → M000032.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000012.html → M000033.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000013.html → M000034.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +33 -32
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000023.html → M000045.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000024.html → M000046.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000025.html → M000047.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000026.html → M000048.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000027.html → M000049.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000028.html → M000050.html} +0 -0
- data/doc/rdoc/classes/RailsHandler.html +225 -0
- data/doc/rdoc/classes/RailsHandler.src/M000001.html +22 -0
- data/doc/rdoc/classes/RailsHandler.src/M000002.html +48 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +45 -50
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +108 -0
- data/doc/rdoc/files/lib/mongrel/command_rb.html +110 -0
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +101 -0
- data/doc/rdoc/files/lib/mongrel/plugins_rb.html +108 -0
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +108 -0
- data/doc/rdoc/fr_class_index.html +8 -0
- data/doc/rdoc/fr_file_index.html +5 -0
- data/doc/rdoc/fr_method_index.html +62 -29
- data/lib/mongrel/command.rb +5 -5
- data/lib/mongrel/plugins.rb +3 -152
- data/lib/mongrel/rails.rb +1 -1
- metadata +95 -35
- data/test/plugins/commands/test1.rb +0 -19
- data/test/test_plugins.rb +0 -45
@@ -0,0 +1,31 @@
|
|
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>send_file (Mongrel::DirHandler)</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/handlers.rb, line 129</span>
|
14
|
+
129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_file</span>(<span class="ruby-identifier">req</span>, <span class="ruby-identifier">response</span>)
|
15
|
+
130: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">start</span>(<span class="ruby-value">200</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">head</span>,<span class="ruby-identifier">out</span><span class="ruby-operator">|</span>
|
16
|
+
131: <span class="ruby-comment cmt"># set the mime type from our map based on the ending</span>
|
17
|
+
132: <span class="ruby-identifier">dot_at</span> = <span class="ruby-identifier">req</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">"."</span>)
|
18
|
+
133: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dot_at</span>
|
19
|
+
134: <span class="ruby-identifier">ext</span> = <span class="ruby-identifier">req</span>[<span class="ruby-identifier">dot_at</span> <span class="ruby-operator">..</span> <span class="ruby-value">-1</span>]
|
20
|
+
135: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">MIME_TYPES</span>[<span class="ruby-identifier">ext</span>]
|
21
|
+
136: <span class="ruby-identifier">head</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-constant">MIME_TYPES</span>[<span class="ruby-identifier">ext</span>]
|
22
|
+
137: <span class="ruby-keyword kw">end</span>
|
23
|
+
138: <span class="ruby-keyword kw">end</span>
|
24
|
+
139:
|
25
|
+
140: <span class="ruby-identifier">open</span>(<span class="ruby-identifier">req</span>, <span class="ruby-value str">"rb"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
26
|
+
141: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>)
|
27
|
+
142: <span class="ruby-keyword kw">end</span>
|
28
|
+
143: <span class="ruby-keyword kw">end</span>
|
29
|
+
144: <span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
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>process (Mongrel::DirHandler)</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/handlers.rb, line 149</span>
|
14
|
+
149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
|
15
|
+
150: <span class="ruby-identifier">req</span> = <span class="ruby-identifier">can_serve</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'PATH_INFO'</span>]
|
16
|
+
151: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">req</span>
|
17
|
+
152: <span class="ruby-comment cmt"># not found, return a 404</span>
|
18
|
+
153: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">start</span>(<span class="ruby-value">404</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">head</span>,<span class="ruby-identifier">out</span><span class="ruby-operator">|</span>
|
19
|
+
154: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"File not found"</span>
|
20
|
+
155: <span class="ruby-keyword kw">end</span>
|
21
|
+
156: <span class="ruby-keyword kw">else</span>
|
22
|
+
157: <span class="ruby-keyword kw">begin</span>
|
23
|
+
158: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">req</span>
|
24
|
+
159: <span class="ruby-identifier">send_dir_listing</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">"REQUEST_URI"</span>],<span class="ruby-identifier">req</span>, <span class="ruby-identifier">response</span>)
|
25
|
+
160: <span class="ruby-keyword kw">else</span>
|
26
|
+
161: <span class="ruby-identifier">send_file</span>(<span class="ruby-identifier">req</span>, <span class="ruby-identifier">response</span>)
|
27
|
+
162: <span class="ruby-keyword kw">end</span>
|
28
|
+
163: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">details</span>
|
29
|
+
164: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">reset</span>
|
30
|
+
165: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">start</span>(<span class="ruby-value">403</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">head</span>,<span class="ruby-identifier">out</span><span class="ruby-operator">|</span>
|
31
|
+
166: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"Error accessing file: #{details}"</span>
|
32
|
+
167: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">details</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>)
|
33
|
+
168: <span class="ruby-keyword kw">end</span>
|
34
|
+
169: <span class="ruby-keyword kw">end</span>
|
35
|
+
170: <span class="ruby-keyword kw">end</span>
|
36
|
+
171: <span class="ruby-keyword kw">end</span></pre>
|
37
|
+
</body>
|
38
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>add_mime_type (Mongrel::DirHandler)</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/handlers.rb, line 175</span>
|
14
|
+
175: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">DirHandler</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_mime_type</span>(<span class="ruby-identifier">extension</span>, <span class="ruby-identifier">type</span>)
|
15
|
+
176: <span class="ruby-constant">MIME_TYPES</span>[<span class="ruby-identifier">extension</span>] = <span class="ruby-identifier">type</span>
|
16
|
+
177: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,171 @@
|
|
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::Error404Handler</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::Error404Handler</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
|
+
The server normally returns a 404 response if an unknown URI is requested,
|
86
|
+
but it also returns a lame empty message. This lets you do a 404 response
|
87
|
+
with a custom message for special URIs.
|
88
|
+
</p>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div id="method-list">
|
96
|
+
<h3 class="section-bar">Methods</h3>
|
97
|
+
|
98
|
+
<div class="name-list">
|
99
|
+
<a href="#M000060">new</a>
|
100
|
+
<a href="#M000061">process</a>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<!-- if method_list -->
|
119
|
+
<div id="methods">
|
120
|
+
<h3 class="section-bar">Public Class methods</h3>
|
121
|
+
|
122
|
+
<div id="method-M000060" class="method-detail">
|
123
|
+
<a name="M000060"></a>
|
124
|
+
|
125
|
+
<div class="method-heading">
|
126
|
+
<a href="Error404Handler.src/M000060.html" target="Code" class="method-signature"
|
127
|
+
onclick="popupCode('Error404Handler.src/M000060.html');return false;">
|
128
|
+
<span class="method-name">new</span><span class="method-args">(msg)</span>
|
129
|
+
</a>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<div class="method-description">
|
133
|
+
<p>
|
134
|
+
Sets the message to return. This is constructed once for the handler so
|
135
|
+
it’s pretty efficient.
|
136
|
+
</p>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
141
|
+
|
142
|
+
<div id="method-M000061" class="method-detail">
|
143
|
+
<a name="M000061"></a>
|
144
|
+
|
145
|
+
<div class="method-heading">
|
146
|
+
<a href="Error404Handler.src/M000061.html" target="Code" class="method-signature"
|
147
|
+
onclick="popupCode('Error404Handler.src/M000061.html');return false;">
|
148
|
+
<span class="method-name">process</span><span class="method-args">(request, response)</span>
|
149
|
+
</a>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
<div class="method-description">
|
153
|
+
<p>
|
154
|
+
Just kicks back the standard 404 response with your special message.
|
155
|
+
</p>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
</div>
|
161
|
+
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
<div id="validator-badges">
|
167
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
</body>
|
171
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>new (Mongrel::Error404Handler)</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/handlers.rb, line 21</span>
|
14
|
+
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">msg</span>)
|
15
|
+
22: <span class="ruby-ivar">@response</span> = <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">ERROR_404_RESPONSE</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">msg</span>
|
16
|
+
23: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>process (Mongrel::Error404Handler)</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/handlers.rb, line 26</span>
|
14
|
+
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
|
15
|
+
27: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-ivar">@response</span>)
|
16
|
+
28: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -101,8 +101,8 @@ there.
|
|
101
101
|
<h3 class="section-bar">Methods</h3>
|
102
102
|
|
103
103
|
<div class="name-list">
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
104
|
+
<a href="#M000036">[]=</a>
|
105
|
+
<a href="#M000035">new</a>
|
106
106
|
</div>
|
107
107
|
</div>
|
108
108
|
|
@@ -137,12 +137,12 @@ there.
|
|
137
137
|
<div id="methods">
|
138
138
|
<h3 class="section-bar">Public Class methods</h3>
|
139
139
|
|
140
|
-
<div id="method-
|
141
|
-
<a name="
|
140
|
+
<div id="method-M000035" class="method-detail">
|
141
|
+
<a name="M000035"></a>
|
142
142
|
|
143
143
|
<div class="method-heading">
|
144
|
-
<a href="HeaderOut.src/
|
145
|
-
onclick="popupCode('HeaderOut.src/
|
144
|
+
<a href="HeaderOut.src/M000035.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('HeaderOut.src/M000035.html');return false;">
|
146
146
|
<span class="method-name">new</span><span class="method-args">(out)</span>
|
147
147
|
</a>
|
148
148
|
</div>
|
@@ -153,12 +153,12 @@ there.
|
|
153
153
|
|
154
154
|
<h3 class="section-bar">Public Instance methods</h3>
|
155
155
|
|
156
|
-
<div id="method-
|
157
|
-
<a name="
|
156
|
+
<div id="method-M000036" class="method-detail">
|
157
|
+
<a name="M000036"></a>
|
158
158
|
|
159
159
|
<div class="method-heading">
|
160
|
-
<a href="HeaderOut.src/
|
161
|
-
onclick="popupCode('HeaderOut.src/
|
160
|
+
<a href="HeaderOut.src/M000036.html" target="Code" class="method-signature"
|
161
|
+
onclick="popupCode('HeaderOut.src/M000036.html');return false;">
|
162
162
|
<span class="method-name">[]=</span><span class="method-args">(key,value)</span>
|
163
163
|
</a>
|
164
164
|
</div>
|
File without changes
|
File without changes
|
@@ -0,0 +1,146 @@
|
|
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::HttpHandler</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::HttpHandler</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
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
You implement your application handler with this. It’s very light
|
84
|
+
giving just the minimum necessary for you to handle a request and shoot
|
85
|
+
back a response. Look at the <a href="HttpRequest.html">HttpRequest</a> and
|
86
|
+
<a href="HttpResponse.html">HttpResponse</a> objects for how to use them.
|
87
|
+
</p>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
<div id="method-list">
|
95
|
+
<h3 class="section-bar">Methods</h3>
|
96
|
+
|
97
|
+
<div class="name-list">
|
98
|
+
<a href="#M000037">process</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
|
107
|
+
<div id="section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<!-- if method_list -->
|
117
|
+
<div id="methods">
|
118
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
119
|
+
|
120
|
+
<div id="method-M000037" class="method-detail">
|
121
|
+
<a name="M000037"></a>
|
122
|
+
|
123
|
+
<div class="method-heading">
|
124
|
+
<a href="HttpHandler.src/M000037.html" target="Code" class="method-signature"
|
125
|
+
onclick="popupCode('HttpHandler.src/M000037.html');return false;">
|
126
|
+
<span class="method-name">process</span><span class="method-args">(request, response)</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div class="method-description">
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
<div id="validator-badges">
|
142
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
</body>
|
146
|
+
</html>
|