thin 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of thin might be problematic. Click here for more details.

Files changed (51) hide show
  1. data/README +47 -5
  2. data/Rakefile +33 -2
  3. data/doc/rdoc/classes/Kernel.html +182 -0
  4. data/doc/rdoc/classes/Process.html +175 -0
  5. data/doc/rdoc/classes/Thin.html +184 -0
  6. data/doc/rdoc/classes/Thin/CGIWrapper.html +438 -0
  7. data/doc/rdoc/classes/Thin/Cluster.html +392 -0
  8. data/doc/rdoc/classes/Thin/Command.html +221 -0
  9. data/doc/rdoc/classes/Thin/CommandError.html +154 -0
  10. data/doc/rdoc/classes/Thin/Commands.html +145 -0
  11. data/doc/rdoc/classes/Thin/Daemonizable.html +250 -0
  12. data/doc/rdoc/classes/Thin/Daemonizable/ClassMethods.html +203 -0
  13. data/doc/rdoc/classes/Thin/DirHandler.html +250 -0
  14. data/doc/rdoc/classes/Thin/Handler.html +195 -0
  15. data/doc/rdoc/classes/Thin/Headers.html +244 -0
  16. data/doc/rdoc/classes/Thin/InvalidRequest.html +150 -0
  17. data/doc/rdoc/classes/Thin/Logging.html +214 -0
  18. data/doc/rdoc/classes/Thin/RailsHandler.html +234 -0
  19. data/doc/rdoc/classes/Thin/RailsServer.html +175 -0
  20. data/doc/rdoc/classes/Thin/Request.html +379 -0
  21. data/doc/rdoc/classes/Thin/Response.html +311 -0
  22. data/doc/rdoc/classes/Thin/Server.html +381 -0
  23. data/doc/rdoc/created.rid +1 -0
  24. data/doc/rdoc/files/README.html +260 -0
  25. data/doc/rdoc/files/bin/thin.html +188 -0
  26. data/doc/rdoc/files/bin/thin_cluster.html +175 -0
  27. data/doc/rdoc/files/lib/thin/cgi_rb.html +263 -0
  28. data/doc/rdoc/files/lib/thin/cluster_rb.html +263 -0
  29. data/doc/rdoc/files/lib/thin/command_rb.html +263 -0
  30. data/doc/rdoc/files/lib/thin/consts_rb.html +263 -0
  31. data/doc/rdoc/files/lib/thin/daemonizing_rb.html +263 -0
  32. data/doc/rdoc/files/lib/thin/handler_rb.html +263 -0
  33. data/doc/rdoc/files/lib/thin/headers_rb.html +263 -0
  34. data/doc/rdoc/files/lib/thin/logging_rb.html +263 -0
  35. data/doc/rdoc/files/lib/thin/mime_types_rb.html +263 -0
  36. data/doc/rdoc/files/lib/thin/rails_rb.html +263 -0
  37. data/doc/rdoc/files/lib/thin/recipes_rb.html +171 -0
  38. data/doc/rdoc/files/lib/thin/request_rb.html +171 -0
  39. data/doc/rdoc/files/lib/thin/response_rb.html +171 -0
  40. data/doc/rdoc/files/lib/thin/server_rb.html +171 -0
  41. data/doc/rdoc/files/lib/thin/statuses_rb.html +171 -0
  42. data/doc/rdoc/files/lib/thin/version_rb.html +171 -0
  43. data/doc/rdoc/index.html +10 -0
  44. data/doc/rdoc/logo.gif +0 -0
  45. data/doc/rdoc/rdoc-style.css +86 -0
  46. data/lib/thin/commands/cluster/config.rb +2 -0
  47. data/lib/thin/consts.rb +4 -0
  48. data/lib/thin/request.rb +30 -11
  49. data/lib/thin/server.rb +1 -1
  50. data/lib/thin/version.rb +1 -1
  51. metadata +52 -1
@@ -0,0 +1,195 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ thin &raquo; Class: Thin::Handler
7
+ </title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <ul id="menu">
52
+ <li><a href="/thin/">home</a></li>
53
+ <li><a href="/thin/doc/">doc</a></li>
54
+ <li><a href="/thin/trac.fcgi/timeline">timeline</a></li>
55
+ <li><a href="/thin/trac.fcgi/browser">code</a></li>
56
+ <li><a href="/thin/trac.fcgi/report">tickets</a></li>
57
+ <li><a href="/thin/trac.fcgi/newticket">new ticket</a></li>
58
+ </ul>
59
+ <div id="sidebar">
60
+ <h2>Files</h2>
61
+ <ul class="list">
62
+ <li><a href="../../files/README.html" value="File: README">README</a></li>
63
+ <li><a href="../../files/lib/thin/cgi_rb.html" value="File: cgi.rb">lib/thin/cgi.rb</a></li>
64
+ <li><a href="../../files/lib/thin/cluster_rb.html" value="File: cluster.rb">lib/thin/cluster.rb</a></li>
65
+ <li><a href="../../files/lib/thin/command_rb.html" value="File: command.rb">lib/thin/command.rb</a></li>
66
+ <li><a href="../../files/lib/thin/consts_rb.html" value="File: consts.rb">lib/thin/consts.rb</a></li>
67
+ <li><a href="../../files/lib/thin/daemonizing_rb.html" value="File: daemonizing.rb">lib/thin/daemonizing.rb</a></li>
68
+ <li><a href="../../files/lib/thin/handler_rb.html" value="File: handler.rb">lib/thin/handler.rb</a></li>
69
+ <li><a href="../../files/lib/thin/headers_rb.html" value="File: headers.rb">lib/thin/headers.rb</a></li>
70
+ <li><a href="../../files/lib/thin/logging_rb.html" value="File: logging.rb">lib/thin/logging.rb</a></li>
71
+ <li><a href="../../files/lib/thin/mime_types_rb.html" value="File: mime_types.rb">lib/thin/mime_types.rb</a></li>
72
+ <li><a href="../../files/lib/thin/rails_rb.html" value="File: rails.rb">lib/thin/rails.rb</a></li>
73
+ <li><a href="../../files/lib/thin/recipes_rb.html" value="File: recipes.rb">lib/thin/recipes.rb</a></li>
74
+ <li><a href="../../files/lib/thin/request_rb.html" value="File: request.rb">lib/thin/request.rb</a></li>
75
+ <li><a href="../../files/lib/thin/response_rb.html" value="File: response.rb">lib/thin/response.rb</a></li>
76
+ <li><a href="../../files/lib/thin/server_rb.html" value="File: server.rb">lib/thin/server.rb</a></li>
77
+ <li><a href="../../files/lib/thin/statuses_rb.html" value="File: statuses.rb">lib/thin/statuses.rb</a></li>
78
+ <li><a href="../../files/lib/thin/version_rb.html" value="File: version.rb">lib/thin/version.rb</a></li>
79
+ <li><a href="../../files/bin/thin.html" value="File: thin">bin/thin</a></li>
80
+ <li><a href="../../files/bin/thin_cluster.html" value="File: thin_cluster">bin/thin_cluster</a></li>
81
+ </ul>
82
+
83
+ <h2>Classes</h2>
84
+ <ul class="list">
85
+ <li><a href="../../classes/Thin.html" title="Module: Thin">Thin</a></li>
86
+ <li><a href="../../classes/Thin/Commands.html" title="Module: Thin::Commands">Thin::Commands</a></li>
87
+ <li><a href="../../classes/Thin/Daemonizable.html" title="Module: Thin::Daemonizable">Thin::Daemonizable</a></li>
88
+ <li><a href="../../classes/Thin/Daemonizable/ClassMethods.html" title="Module: Thin::Daemonizable::ClassMethods">Thin::Daemonizable::ClassMethods</a></li>
89
+ <li><a href="../../classes/Thin/VERSION.html" title="Module: Thin::VERSION">Thin::VERSION</a></li>
90
+ <li><a href="../../classes/Thin/Logging.html" title="Module: Thin::Logging">Thin::Logging</a></li>
91
+ <li><a href="../../classes/Thin/DirHandler.html" title="Class: Thin::DirHandler">Thin::DirHandler</a></li>
92
+ <li><a href="../../classes/Thin/InvalidRequest.html" title="Class: Thin::InvalidRequest">Thin::InvalidRequest</a></li>
93
+ <li><a href="../../classes/Thin/CGIWrapper.html" title="Class: Thin::CGIWrapper">Thin::CGIWrapper</a></li>
94
+ <li><a href="../../classes/Thin/Command.html" title="Class: Thin::Command">Thin::Command</a></li>
95
+ <li><a href="../../classes/Thin/Response.html" title="Class: Thin::Response">Thin::Response</a></li>
96
+ <li><a href="../../classes/Thin/Headers.html" title="Class: Thin::Headers">Thin::Headers</a></li>
97
+ <li><a href="../../classes/Thin/Server.html" title="Class: Thin::Server">Thin::Server</a></li>
98
+ <li><a href="../../classes/Thin/CommandError.html" title="Class: Thin::CommandError">Thin::CommandError</a></li>
99
+ <li><a href="../../classes/Thin/Request.html" title="Class: Thin::Request">Thin::Request</a></li>
100
+ <li><a href="../../classes/Thin/RailsServer.html" title="Class: Thin::RailsServer">Thin::RailsServer</a></li>
101
+ <li><a href="../../classes/Thin/Cluster.html" title="Class: Thin::Cluster">Thin::Cluster</a></li>
102
+ <li><a href="../../classes/Thin/RailsHandler.html" title="Class: Thin::RailsHandler">Thin::RailsHandler</a></li>
103
+ <li><a href="../../classes/Thin/Handler.html" title="Class: Thin::Handler">Thin::Handler</a></li>
104
+ <li><a href="../../classes/Process.html" title="Module: Process">Process</a></li>
105
+ <li><a href="../../classes/Kernel.html" title="Module: Kernel">Kernel</a></li>
106
+ </ul>
107
+ </div>
108
+ <div id="container">
109
+ <div id="header">
110
+ <a href="/thin/" title="Home">
111
+ <img id="logo" src="../../logo.gif" />
112
+ </a>
113
+ <h2 id="tag_line">A fast and very simple Ruby web server</h2>
114
+ </div>
115
+
116
+ <div id="content">
117
+ <h2>Class: Thin::Handler</h2>
118
+
119
+
120
+ <div id="Thin::Handler" class="page_shade">
121
+ <div class="page">
122
+ <h3>Class Thin::Handler &lt; <a href="Handler.html">Object</a></h3>
123
+
124
+ <span class="path">(in files
125
+ <a href="../../files/lib/thin/handler_rb.html">lib/thin/handler.rb</a>
126
+ )</span>
127
+
128
+ <p>
129
+ Handle a request and populate a response.
130
+ </p>
131
+
132
+
133
+
134
+
135
+ <h4>Includes</h4>
136
+ <ul>
137
+ <li><a href="Logging.html">Logging</a></li>
138
+ </ul>
139
+
140
+ <h2 class="ruled">Methods</h2>
141
+ <h4 class="ruled">
142
+ <span class="method-type" title="Public Instance method">Public Instance</span>
143
+ <strong><a name="M000071" href="#M000071" title="Permalink to Public Instance method: process">process(request, response)</a></strong>
144
+ </h4>
145
+
146
+ <p>
147
+ <a href="../Process.html">Process</a> the incoming <tt>request</tt> into
148
+ the <tt>response</tt> that will be sent to the client. Return <tt>true</tt>
149
+ to send the request to the next handler or <tt>false</tt> to stop
150
+ processing the request and send the response to the client right away.
151
+ </p>
152
+
153
+ <div class="sourcecode">
154
+ <p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
155
+ <div id="M000071_source" class="dyn-source">
156
+ <pre>
157
+ <span class="ruby-comment cmt"># File lib/thin/handler.rb, line 14</span>
158
+ 14: <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>)
159
+ 15: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplemented</span>
160
+ 16: <span class="ruby-keyword kw">end</span>
161
+ </pre>
162
+ </div>
163
+ </div>
164
+ <h4 class="ruled">
165
+ <span class="method-type" title="Public Instance method">Public Instance</span>
166
+ <strong><a name="M000070" href="#M000070" title="Permalink to Public Instance method: start">start()</a></strong>
167
+ </h4>
168
+
169
+ <p>
170
+ Start the handler. Initialize resources, open files, that kinda thing.
171
+ </p>
172
+
173
+ <div class="sourcecode">
174
+ <p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
175
+ <div id="M000070_source" class="dyn-source">
176
+ <pre>
177
+ <span class="ruby-comment cmt"># File lib/thin/handler.rb, line 6</span>
178
+ 6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
179
+ 7: <span class="ruby-keyword kw">end</span>
180
+ </pre>
181
+ </div>
182
+ </div>
183
+
184
+ </div>
185
+ </div>
186
+
187
+
188
+ </div>
189
+ </div>
190
+ <div id="footer">
191
+ <hr />
192
+ &copy; <a href="http://macournoyer.com">Marc-Andr&eacute; Cournoyer</a>
193
+ </div>
194
+ </body>
195
+ </html>
@@ -0,0 +1,244 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ thin &raquo; Class: Thin::Headers
7
+ </title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <ul id="menu">
52
+ <li><a href="/thin/">home</a></li>
53
+ <li><a href="/thin/doc/">doc</a></li>
54
+ <li><a href="/thin/trac.fcgi/timeline">timeline</a></li>
55
+ <li><a href="/thin/trac.fcgi/browser">code</a></li>
56
+ <li><a href="/thin/trac.fcgi/report">tickets</a></li>
57
+ <li><a href="/thin/trac.fcgi/newticket">new ticket</a></li>
58
+ </ul>
59
+ <div id="sidebar">
60
+ <h2>Files</h2>
61
+ <ul class="list">
62
+ <li><a href="../../files/README.html" value="File: README">README</a></li>
63
+ <li><a href="../../files/lib/thin/cgi_rb.html" value="File: cgi.rb">lib/thin/cgi.rb</a></li>
64
+ <li><a href="../../files/lib/thin/cluster_rb.html" value="File: cluster.rb">lib/thin/cluster.rb</a></li>
65
+ <li><a href="../../files/lib/thin/command_rb.html" value="File: command.rb">lib/thin/command.rb</a></li>
66
+ <li><a href="../../files/lib/thin/consts_rb.html" value="File: consts.rb">lib/thin/consts.rb</a></li>
67
+ <li><a href="../../files/lib/thin/daemonizing_rb.html" value="File: daemonizing.rb">lib/thin/daemonizing.rb</a></li>
68
+ <li><a href="../../files/lib/thin/handler_rb.html" value="File: handler.rb">lib/thin/handler.rb</a></li>
69
+ <li><a href="../../files/lib/thin/headers_rb.html" value="File: headers.rb">lib/thin/headers.rb</a></li>
70
+ <li><a href="../../files/lib/thin/logging_rb.html" value="File: logging.rb">lib/thin/logging.rb</a></li>
71
+ <li><a href="../../files/lib/thin/mime_types_rb.html" value="File: mime_types.rb">lib/thin/mime_types.rb</a></li>
72
+ <li><a href="../../files/lib/thin/rails_rb.html" value="File: rails.rb">lib/thin/rails.rb</a></li>
73
+ <li><a href="../../files/lib/thin/recipes_rb.html" value="File: recipes.rb">lib/thin/recipes.rb</a></li>
74
+ <li><a href="../../files/lib/thin/request_rb.html" value="File: request.rb">lib/thin/request.rb</a></li>
75
+ <li><a href="../../files/lib/thin/response_rb.html" value="File: response.rb">lib/thin/response.rb</a></li>
76
+ <li><a href="../../files/lib/thin/server_rb.html" value="File: server.rb">lib/thin/server.rb</a></li>
77
+ <li><a href="../../files/lib/thin/statuses_rb.html" value="File: statuses.rb">lib/thin/statuses.rb</a></li>
78
+ <li><a href="../../files/lib/thin/version_rb.html" value="File: version.rb">lib/thin/version.rb</a></li>
79
+ <li><a href="../../files/bin/thin.html" value="File: thin">bin/thin</a></li>
80
+ <li><a href="../../files/bin/thin_cluster.html" value="File: thin_cluster">bin/thin_cluster</a></li>
81
+ </ul>
82
+
83
+ <h2>Classes</h2>
84
+ <ul class="list">
85
+ <li><a href="../../classes/Thin.html" title="Module: Thin">Thin</a></li>
86
+ <li><a href="../../classes/Thin/Commands.html" title="Module: Thin::Commands">Thin::Commands</a></li>
87
+ <li><a href="../../classes/Thin/Daemonizable.html" title="Module: Thin::Daemonizable">Thin::Daemonizable</a></li>
88
+ <li><a href="../../classes/Thin/Daemonizable/ClassMethods.html" title="Module: Thin::Daemonizable::ClassMethods">Thin::Daemonizable::ClassMethods</a></li>
89
+ <li><a href="../../classes/Thin/VERSION.html" title="Module: Thin::VERSION">Thin::VERSION</a></li>
90
+ <li><a href="../../classes/Thin/Logging.html" title="Module: Thin::Logging">Thin::Logging</a></li>
91
+ <li><a href="../../classes/Thin/DirHandler.html" title="Class: Thin::DirHandler">Thin::DirHandler</a></li>
92
+ <li><a href="../../classes/Thin/InvalidRequest.html" title="Class: Thin::InvalidRequest">Thin::InvalidRequest</a></li>
93
+ <li><a href="../../classes/Thin/CGIWrapper.html" title="Class: Thin::CGIWrapper">Thin::CGIWrapper</a></li>
94
+ <li><a href="../../classes/Thin/Command.html" title="Class: Thin::Command">Thin::Command</a></li>
95
+ <li><a href="../../classes/Thin/Response.html" title="Class: Thin::Response">Thin::Response</a></li>
96
+ <li><a href="../../classes/Thin/Headers.html" title="Class: Thin::Headers">Thin::Headers</a></li>
97
+ <li><a href="../../classes/Thin/Server.html" title="Class: Thin::Server">Thin::Server</a></li>
98
+ <li><a href="../../classes/Thin/CommandError.html" title="Class: Thin::CommandError">Thin::CommandError</a></li>
99
+ <li><a href="../../classes/Thin/Request.html" title="Class: Thin::Request">Thin::Request</a></li>
100
+ <li><a href="../../classes/Thin/RailsServer.html" title="Class: Thin::RailsServer">Thin::RailsServer</a></li>
101
+ <li><a href="../../classes/Thin/Cluster.html" title="Class: Thin::Cluster">Thin::Cluster</a></li>
102
+ <li><a href="../../classes/Thin/RailsHandler.html" title="Class: Thin::RailsHandler">Thin::RailsHandler</a></li>
103
+ <li><a href="../../classes/Thin/Handler.html" title="Class: Thin::Handler">Thin::Handler</a></li>
104
+ <li><a href="../../classes/Process.html" title="Module: Process">Process</a></li>
105
+ <li><a href="../../classes/Kernel.html" title="Module: Kernel">Kernel</a></li>
106
+ </ul>
107
+ </div>
108
+ <div id="container">
109
+ <div id="header">
110
+ <a href="/thin/" title="Home">
111
+ <img id="logo" src="../../logo.gif" />
112
+ </a>
113
+ <h2 id="tag_line">A fast and very simple Ruby web server</h2>
114
+ </div>
115
+
116
+ <div id="content">
117
+ <h2>Class: Thin::Headers</h2>
118
+
119
+
120
+ <div id="Thin::Headers" class="page_shade">
121
+ <div class="page">
122
+ <h3>Class Thin::Headers &lt; <a href="Handler.html">Object</a></h3>
123
+
124
+ <span class="path">(in files
125
+ <a href="../../files/lib/thin/headers_rb.html">lib/thin/headers.rb</a>
126
+ )</span>
127
+
128
+ <p>
129
+ Acts like a Hash, but allows duplicated keys
130
+ </p>
131
+
132
+
133
+
134
+
135
+
136
+ <h2 class="ruled">Methods</h2>
137
+ <h4 class="ruled">
138
+ <span class="method-type" title="Public Class method">Public Class</span>
139
+ <strong><a name="M000036" href="#M000036" title="Permalink to Public Class method: new">new()</a></strong>
140
+ </h4>
141
+
142
+
143
+ <div class="sourcecode">
144
+ <p class="source-link">[ <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show source</a> ]</p>
145
+ <div id="M000036_source" class="dyn-source">
146
+ <pre>
147
+ <span class="ruby-comment cmt"># File lib/thin/headers.rb, line 6</span>
148
+ 6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
149
+ 7: <span class="ruby-ivar">@sent</span> = {}
150
+ 8: <span class="ruby-ivar">@items</span> = []
151
+ 9: <span class="ruby-keyword kw">end</span>
152
+ </pre>
153
+ </div>
154
+ </div>
155
+ <h4 class="ruled">
156
+ <span class="method-type" title="Public Instance method">Public Instance</span>
157
+ <strong><a name="M000038" href="#M000038" title="Permalink to Public Instance method: []">[](key)</a></strong>
158
+ </h4>
159
+
160
+
161
+ <div class="sourcecode">
162
+ <p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p>
163
+ <div id="M000038_source" class="dyn-source">
164
+ <pre>
165
+ <span class="ruby-comment cmt"># File lib/thin/headers.rb, line 22</span>
166
+ 22: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
167
+ 23: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">item</span> = <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">assoc</span>(<span class="ruby-identifier">key</span>)
168
+ 24: <span class="ruby-identifier">item</span>[<span class="ruby-value">1</span>]
169
+ 25: <span class="ruby-keyword kw">end</span>
170
+ 26: <span class="ruby-keyword kw">end</span>
171
+ </pre>
172
+ </div>
173
+ </div>
174
+ <h4 class="ruled">
175
+ <span class="method-type" title="Public Instance method">Public Instance</span>
176
+ <strong><a name="M000037" href="#M000037" title="Permalink to Public Instance method: []=">[]=(key, value)</a></strong>
177
+ </h4>
178
+
179
+
180
+ <div class="sourcecode">
181
+ <p class="source-link">[ <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show source</a> ]</p>
182
+ <div id="M000037_source" class="dyn-source">
183
+ <pre>
184
+ <span class="ruby-comment cmt"># File lib/thin/headers.rb, line 11</span>
185
+ 11: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
186
+ 12: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@sent</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@@allowed_duplicates</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">key</span>)
187
+ 13: <span class="ruby-comment cmt"># If we don't allow duplicate for that field</span>
188
+ 14: <span class="ruby-comment cmt"># we overwrite the one that is already there</span>
189
+ 15: <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">assoc</span>(<span class="ruby-identifier">key</span>)[<span class="ruby-value">1</span>] = <span class="ruby-identifier">value</span>
190
+ 16: <span class="ruby-keyword kw">else</span>
191
+ 17: <span class="ruby-ivar">@sent</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-keyword kw">true</span>
192
+ 18: <span class="ruby-ivar">@items</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>]
193
+ 19: <span class="ruby-keyword kw">end</span>
194
+ 20: <span class="ruby-keyword kw">end</span>
195
+ </pre>
196
+ </div>
197
+ </div>
198
+ <h4 class="ruled">
199
+ <span class="method-type" title="Public Instance method">Public Instance</span>
200
+ <strong><a name="M000039" href="#M000039" title="Permalink to Public Instance method: size">size()</a></strong>
201
+ </h4>
202
+
203
+
204
+ <div class="sourcecode">
205
+ <p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p>
206
+ <div id="M000039_source" class="dyn-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/thin/headers.rb, line 28</span>
209
+ 28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span>
210
+ 29: <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">size</span>
211
+ 30: <span class="ruby-keyword kw">end</span>
212
+ </pre>
213
+ </div>
214
+ </div>
215
+ <h4 class="ruled">
216
+ <span class="method-type" title="Public Instance method">Public Instance</span>
217
+ <strong><a name="M000040" href="#M000040" title="Permalink to Public Instance method: to_s">to_s()</a></strong>
218
+ </h4>
219
+
220
+
221
+ <div class="sourcecode">
222
+ <p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p>
223
+ <div id="M000040_source" class="dyn-source">
224
+ <pre>
225
+ <span class="ruby-comment cmt"># File lib/thin/headers.rb, line 32</span>
226
+ 32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
227
+ 33: <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value str">''</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">out</span>, (<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">HEADER_FORMAT</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>] }
228
+ 34: <span class="ruby-keyword kw">end</span>
229
+ </pre>
230
+ </div>
231
+ </div>
232
+
233
+ </div>
234
+ </div>
235
+
236
+
237
+ </div>
238
+ </div>
239
+ <div id="footer">
240
+ <hr />
241
+ &copy; <a href="http://macournoyer.com">Marc-Andr&eacute; Cournoyer</a>
242
+ </div>
243
+ </body>
244
+ </html>
@@ -0,0 +1,150 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ thin &raquo; Class: Thin::InvalidRequest
7
+ </title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <ul id="menu">
52
+ <li><a href="/thin/">home</a></li>
53
+ <li><a href="/thin/doc/">doc</a></li>
54
+ <li><a href="/thin/trac.fcgi/timeline">timeline</a></li>
55
+ <li><a href="/thin/trac.fcgi/browser">code</a></li>
56
+ <li><a href="/thin/trac.fcgi/report">tickets</a></li>
57
+ <li><a href="/thin/trac.fcgi/newticket">new ticket</a></li>
58
+ </ul>
59
+ <div id="sidebar">
60
+ <h2>Files</h2>
61
+ <ul class="list">
62
+ <li><a href="../../files/README.html" value="File: README">README</a></li>
63
+ <li><a href="../../files/lib/thin/cgi_rb.html" value="File: cgi.rb">lib/thin/cgi.rb</a></li>
64
+ <li><a href="../../files/lib/thin/cluster_rb.html" value="File: cluster.rb">lib/thin/cluster.rb</a></li>
65
+ <li><a href="../../files/lib/thin/command_rb.html" value="File: command.rb">lib/thin/command.rb</a></li>
66
+ <li><a href="../../files/lib/thin/consts_rb.html" value="File: consts.rb">lib/thin/consts.rb</a></li>
67
+ <li><a href="../../files/lib/thin/daemonizing_rb.html" value="File: daemonizing.rb">lib/thin/daemonizing.rb</a></li>
68
+ <li><a href="../../files/lib/thin/handler_rb.html" value="File: handler.rb">lib/thin/handler.rb</a></li>
69
+ <li><a href="../../files/lib/thin/headers_rb.html" value="File: headers.rb">lib/thin/headers.rb</a></li>
70
+ <li><a href="../../files/lib/thin/logging_rb.html" value="File: logging.rb">lib/thin/logging.rb</a></li>
71
+ <li><a href="../../files/lib/thin/mime_types_rb.html" value="File: mime_types.rb">lib/thin/mime_types.rb</a></li>
72
+ <li><a href="../../files/lib/thin/rails_rb.html" value="File: rails.rb">lib/thin/rails.rb</a></li>
73
+ <li><a href="../../files/lib/thin/recipes_rb.html" value="File: recipes.rb">lib/thin/recipes.rb</a></li>
74
+ <li><a href="../../files/lib/thin/request_rb.html" value="File: request.rb">lib/thin/request.rb</a></li>
75
+ <li><a href="../../files/lib/thin/response_rb.html" value="File: response.rb">lib/thin/response.rb</a></li>
76
+ <li><a href="../../files/lib/thin/server_rb.html" value="File: server.rb">lib/thin/server.rb</a></li>
77
+ <li><a href="../../files/lib/thin/statuses_rb.html" value="File: statuses.rb">lib/thin/statuses.rb</a></li>
78
+ <li><a href="../../files/lib/thin/version_rb.html" value="File: version.rb">lib/thin/version.rb</a></li>
79
+ <li><a href="../../files/bin/thin.html" value="File: thin">bin/thin</a></li>
80
+ <li><a href="../../files/bin/thin_cluster.html" value="File: thin_cluster">bin/thin_cluster</a></li>
81
+ </ul>
82
+
83
+ <h2>Classes</h2>
84
+ <ul class="list">
85
+ <li><a href="../../classes/Thin.html" title="Module: Thin">Thin</a></li>
86
+ <li><a href="../../classes/Thin/Commands.html" title="Module: Thin::Commands">Thin::Commands</a></li>
87
+ <li><a href="../../classes/Thin/Daemonizable.html" title="Module: Thin::Daemonizable">Thin::Daemonizable</a></li>
88
+ <li><a href="../../classes/Thin/Daemonizable/ClassMethods.html" title="Module: Thin::Daemonizable::ClassMethods">Thin::Daemonizable::ClassMethods</a></li>
89
+ <li><a href="../../classes/Thin/VERSION.html" title="Module: Thin::VERSION">Thin::VERSION</a></li>
90
+ <li><a href="../../classes/Thin/Logging.html" title="Module: Thin::Logging">Thin::Logging</a></li>
91
+ <li><a href="../../classes/Thin/DirHandler.html" title="Class: Thin::DirHandler">Thin::DirHandler</a></li>
92
+ <li><a href="../../classes/Thin/InvalidRequest.html" title="Class: Thin::InvalidRequest">Thin::InvalidRequest</a></li>
93
+ <li><a href="../../classes/Thin/CGIWrapper.html" title="Class: Thin::CGIWrapper">Thin::CGIWrapper</a></li>
94
+ <li><a href="../../classes/Thin/Command.html" title="Class: Thin::Command">Thin::Command</a></li>
95
+ <li><a href="../../classes/Thin/Response.html" title="Class: Thin::Response">Thin::Response</a></li>
96
+ <li><a href="../../classes/Thin/Headers.html" title="Class: Thin::Headers">Thin::Headers</a></li>
97
+ <li><a href="../../classes/Thin/Server.html" title="Class: Thin::Server">Thin::Server</a></li>
98
+ <li><a href="../../classes/Thin/CommandError.html" title="Class: Thin::CommandError">Thin::CommandError</a></li>
99
+ <li><a href="../../classes/Thin/Request.html" title="Class: Thin::Request">Thin::Request</a></li>
100
+ <li><a href="../../classes/Thin/RailsServer.html" title="Class: Thin::RailsServer">Thin::RailsServer</a></li>
101
+ <li><a href="../../classes/Thin/Cluster.html" title="Class: Thin::Cluster">Thin::Cluster</a></li>
102
+ <li><a href="../../classes/Thin/RailsHandler.html" title="Class: Thin::RailsHandler">Thin::RailsHandler</a></li>
103
+ <li><a href="../../classes/Thin/Handler.html" title="Class: Thin::Handler">Thin::Handler</a></li>
104
+ <li><a href="../../classes/Process.html" title="Module: Process">Process</a></li>
105
+ <li><a href="../../classes/Kernel.html" title="Module: Kernel">Kernel</a></li>
106
+ </ul>
107
+ </div>
108
+ <div id="container">
109
+ <div id="header">
110
+ <a href="/thin/" title="Home">
111
+ <img id="logo" src="../../logo.gif" />
112
+ </a>
113
+ <h2 id="tag_line">A fast and very simple Ruby web server</h2>
114
+ </div>
115
+
116
+ <div id="content">
117
+ <h2>Class: Thin::InvalidRequest</h2>
118
+
119
+
120
+ <div id="Thin::InvalidRequest" class="page_shade">
121
+ <div class="page">
122
+ <h3>Class Thin::InvalidRequest &lt; <a href="Handler.html">StandardError</a></h3>
123
+
124
+ <span class="path">(in files
125
+ <a href="../../files/lib/thin/request_rb.html">lib/thin/request.rb</a>
126
+ )</span>
127
+
128
+ <p>
129
+ Raised when an incoming request is not valid and the server can not process
130
+ it.
131
+ </p>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ </div>
140
+ </div>
141
+
142
+
143
+ </div>
144
+ </div>
145
+ <div id="footer">
146
+ <hr />
147
+ &copy; <a href="http://macournoyer.com">Marc-Andr&eacute; Cournoyer</a>
148
+ </div>
149
+ </body>
150
+ </html>