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,36 +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>new (Mongrel::HttpServer)</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.rb, line 346</span>
14
- 346: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">num_processors</span>=<span class="ruby-value">20</span>, <span class="ruby-identifier">timeout</span>=<span class="ruby-value">120</span>)
15
- 347: <span class="ruby-ivar">@socket</span> = <span class="ruby-constant">TCPServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>)
16
- 348:
17
- 349: <span class="ruby-ivar">@classifier</span> = <span class="ruby-constant">URIClassifier</span>.<span class="ruby-identifier">new</span>
18
- 350: <span class="ruby-ivar">@req_queue</span> = <span class="ruby-constant">Queue</span>.<span class="ruby-identifier">new</span>
19
- 351: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
20
- 352: <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
21
- 353: <span class="ruby-ivar">@processors</span> = []
22
- 354:
23
- 355: <span class="ruby-comment cmt"># create the worker threads</span>
24
- 356: <span class="ruby-identifier">num_processors</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
25
- 357: <span class="ruby-ivar">@processors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
26
- 358: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">client</span> = <span class="ruby-ivar">@req_queue</span>.<span class="ruby-identifier">deq</span>
27
- 359: <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">timeout</span>) <span class="ruby-keyword kw">do</span>
28
- 360: <span class="ruby-identifier">process_client</span>(<span class="ruby-identifier">client</span>)
29
- 361: <span class="ruby-keyword kw">end</span>
30
- 362: <span class="ruby-keyword kw">end</span>
31
- 363: <span class="ruby-keyword kw">end</span>
32
- 364: <span class="ruby-keyword kw">end</span>
33
- 365:
34
- 366: <span class="ruby-keyword kw">end</span></pre>
35
- </body>
36
- </html>
@@ -1,57 +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>process_client (Mongrel::HttpServer)</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.rb, line 374</span>
14
- 374: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_client</span>(<span class="ruby-identifier">client</span>)
15
- 375: <span class="ruby-keyword kw">begin</span>
16
- 376: <span class="ruby-identifier">parser</span> = <span class="ruby-constant">HttpParser</span>.<span class="ruby-identifier">new</span>
17
- 377: <span class="ruby-identifier">params</span> = {}
18
- 378: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">CHUNK_SIZE</span>)
19
- 379:
20
- 380: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
21
- 381: <span class="ruby-identifier">nread</span> = <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">params</span>, <span class="ruby-identifier">data</span>)
22
- 382: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">finished?</span>
23
- 383: <span class="ruby-identifier">script_name</span>, <span class="ruby-identifier">path_info</span>, <span class="ruby-identifier">handler</span> = <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">resolve</span>(<span class="ruby-identifier">params</span>[<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REQUEST_URI</span>])
24
- 384:
25
- 385: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">handler</span>
26
- 386: <span class="ruby-identifier">params</span>[<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_INFO</span>] = <span class="ruby-identifier">path_info</span>
27
- 387: <span class="ruby-identifier">params</span>[<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">SCRIPT_NAME</span>] = <span class="ruby-identifier">script_name</span>
28
- 388: <span class="ruby-identifier">request</span> = <span class="ruby-constant">HttpRequest</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>, <span class="ruby-identifier">data</span>[<span class="ruby-identifier">nread</span> <span class="ruby-operator">...</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">length</span>], <span class="ruby-identifier">client</span>)
29
- 389: <span class="ruby-identifier">response</span> = <span class="ruby-constant">HttpResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">client</span>)
30
- 390: <span class="ruby-identifier">handler</span>.<span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
31
- 391: <span class="ruby-keyword kw">else</span>
32
- 392: <span class="ruby-identifier">client</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">ERROR_404_RESPONSE</span>)
33
- 393: <span class="ruby-keyword kw">end</span>
34
- 394:
35
- 395: <span class="ruby-keyword kw">break</span> <span class="ruby-comment cmt">#done</span>
36
- 396: <span class="ruby-keyword kw">else</span>
37
- 397: <span class="ruby-comment cmt"># gotta stream and read again until we can get the parser to be character safe</span>
38
- 398: <span class="ruby-comment cmt"># TODO: make this more efficient since this means we're parsing a lot repeatedly</span>
39
- 399: <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">reset</span>
40
- 400: <span class="ruby-identifier">data</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">client</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">CHUNK_SIZE</span>)
41
- 401: <span class="ruby-keyword kw">end</span>
42
- 402: <span class="ruby-keyword kw">end</span>
43
- 403: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
44
- 404: <span class="ruby-comment cmt"># ignored</span>
45
- 405: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
46
- 406: <span class="ruby-comment cmt"># ignored</span>
47
- 407: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPIPE</span>
48
- 408: <span class="ruby-comment cmt"># ignored</span>
49
- 409: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">details</span>
50
- 410: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;ERROR(#{details.class}): #{details}&quot;</span>
51
- 411: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">details</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
52
- 412: <span class="ruby-keyword kw">ensure</span>
53
- 413: <span class="ruby-identifier">client</span>.<span class="ruby-identifier">close</span>
54
- 414: <span class="ruby-keyword kw">end</span>
55
- 415: <span class="ruby-keyword kw">end</span></pre>
56
- </body>
57
- </html>
@@ -1,48 +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::HttpServer)</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.rb, line 419</span>
14
- 419: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
15
- 420: <span class="ruby-constant">BasicSocket</span>.<span class="ruby-identifier">do_not_reverse_lookup</span>=<span class="ruby-keyword kw">true</span>
16
- 421: <span class="ruby-ivar">@acceptor</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
17
- 422: <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:stopped</span>] = <span class="ruby-keyword kw">false</span>
18
- 423:
19
- 424: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:stopped</span>]
20
- 425: <span class="ruby-keyword kw">begin</span>
21
- 426: <span class="ruby-ivar">@req_queue</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">accept</span>
22
- 427: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StopServer</span>
23
- 428: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Server stopped. Exiting.&quot;</span>
24
- 429: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">closed?</span>
25
- 430: <span class="ruby-keyword kw">break</span>
26
- 431: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EMFILE</span>
27
- 432: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Too many open files. Try increasing ulimits.&quot;</span>
28
- 433: <span class="ruby-identifier">sleep</span> <span class="ruby-value">0</span><span class="ruby-value">.5</span>
29
- 434: <span class="ruby-keyword kw">end</span>
30
- 435: <span class="ruby-keyword kw">end</span>
31
- 436:
32
- 437: <span class="ruby-comment cmt"># now that processing is done we feed enough false onto the request queue to get</span>
33
- 438: <span class="ruby-comment cmt"># each processor to exit and stop processing.</span>
34
- 439: <span class="ruby-ivar">@processors</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> { <span class="ruby-ivar">@req_queue</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">false</span> }
35
- 440:
36
- 441: <span class="ruby-comment cmt"># finally we wait until the queue is empty</span>
37
- 442: <span class="ruby-keyword kw">while</span> <span class="ruby-ivar">@req_queue</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
38
- 443: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Shutdown waiting for #{@req_queue.length} requests&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@req_queue</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
39
- 444: <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span>
40
- 445: <span class="ruby-keyword kw">end</span>
41
- 446: <span class="ruby-keyword kw">end</span>
42
- 447:
43
- 448: <span class="ruby-ivar">@acceptor</span>.<span class="ruby-identifier">priority</span> = <span class="ruby-value">1</span>
44
- 449:
45
- 450: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@acceptor</span>
46
- 451: <span class="ruby-keyword kw">end</span></pre>
47
- </body>
48
- </html>
@@ -1,18 +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>register (Mongrel::HttpServer)</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.rb, line 457</span>
14
- 457: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">handler</span>)
15
- 458: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">handler</span>)
16
- 459: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +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>unregister (Mongrel::HttpServer)</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.rb, line 463</span>
14
- 463: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">uri</span>)
15
- 464: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">uri</span>)
16
- 465: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,23 +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>stop (Mongrel::HttpServer)</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.rb, line 469</span>
14
- 469: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
15
- 470: <span class="ruby-identifier">stopper</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
16
- 471: <span class="ruby-ivar">@acceptor</span>[<span class="ruby-identifier">:stopped</span>] = <span class="ruby-keyword kw">true</span>
17
- 472: <span class="ruby-identifier">exc</span> = <span class="ruby-constant">StopServer</span>.<span class="ruby-identifier">new</span>
18
- 473: <span class="ruby-ivar">@acceptor</span>.<span class="ruby-identifier">raise</span>(<span class="ruby-identifier">exc</span>)
19
- 474: <span class="ruby-keyword kw">end</span>
20
- 475: <span class="ruby-identifier">stopper</span>.<span class="ruby-identifier">priority</span> = <span class="ruby-value">10</span>
21
- 476: <span class="ruby-keyword kw">end</span></pre>
22
- </body>
23
- </html>
@@ -1,117 +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::StopServer</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::StopServer</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
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Exception
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
- Used to stop the <a href="HttpServer.html">HttpServer</a> via Thread.raise.
84
- </p>
85
-
86
- </div>
87
-
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
-
95
- <!-- if includes -->
96
-
97
- <div id="section">
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
- <!-- if method_list -->
107
-
108
-
109
- </div>
110
-
111
-
112
- <div id="validator-badges">
113
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114
- </div>
115
-
116
- </body>
117
- </html>
@@ -1,117 +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::TimeoutWorker</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::TimeoutWorker</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
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Exception
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
- Used to timeout worker threads that have taken too long
84
- </p>
85
-
86
- </div>
87
-
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
-
95
- <!-- if includes -->
96
-
97
- <div id="section">
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
- <!-- if method_list -->
107
-
108
-
109
- </div>
110
-
111
-
112
- <div id="validator-badges">
113
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
114
- </div>
115
-
116
- </body>
117
- </html>
@@ -1,301 +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::URIClassifier</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::URIClassifier</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
- <a href="../../files/ext/http11/http11_c.html">
63
- ext/http11/http11.c
64
- </a>
65
- <br />
66
- </td>
67
- </tr>
68
-
69
- <tr class="top-aligned-row">
70
- <td><strong>Parent:</strong></td>
71
- <td>
72
- Object
73
- </td>
74
- </tr>
75
- </table>
76
- </div>
77
- <!-- banner header -->
78
-
79
- <div id="bodyContent">
80
-
81
-
82
-
83
- <div id="contextContent">
84
-
85
-
86
-
87
- </div>
88
-
89
- <div id="method-list">
90
- <h3 class="section-bar">Methods</h3>
91
-
92
- <div class="name-list">
93
- <a href="#M000052">inspect</a>&nbsp;&nbsp;
94
- <a href="#M000053">new</a>&nbsp;&nbsp;
95
- <a href="#M000054">register</a>&nbsp;&nbsp;
96
- <a href="#M000056">resolve</a>&nbsp;&nbsp;
97
- <a href="#M000055">unregister</a>&nbsp;&nbsp;
98
- <a href="#M000051">uris</a>&nbsp;&nbsp;
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 Class methods</h3>
119
-
120
- <div id="method-M000053" class="method-detail">
121
- <a name="M000053"></a>
122
-
123
- <div class="method-heading">
124
- <a href="URIClassifier.src/M000053.html" target="Code" class="method-signature"
125
- onclick="popupCode('URIClassifier.src/M000053.html');return false;">
126
- <span class="method-name">URIClassifier.new &rarr; URIClassifier<br />
127
- </span>
128
- </a>
129
- </div>
130
-
131
- <div class="method-description">
132
- <p>
133
- Initializes a new <a href="URIClassifier.html">URIClassifier</a> object
134
- that you can use to associate URI sequences with objects. You can actually
135
- use it with any string sequence and any objects, but it&#8217;s mostly used
136
- with URIs.
137
- </p>
138
- <p>
139
- It uses TST from <a
140
- href="http://www.octavian.org/cs/software.html">www.octavian.org/cs/software.html</a>
141
- to build an ternary search trie to hold all of the URIs. It uses this to do
142
- an initial search for the a URI prefix, and then to break the URI into
143
- SCRIPT_NAME and PATH_INFO portions. It actually will do two searches most
144
- of the time in order to find the right handler for the registered prefix
145
- portion.
146
- </p>
147
- </div>
148
- </div>
149
-
150
- <h3 class="section-bar">Public Instance methods</h3>
151
-
152
- <div id="method-M000052" class="method-detail">
153
- <a name="M000052"></a>
154
-
155
- <div class="method-heading">
156
- <a href="URIClassifier.src/M000052.html" target="Code" class="method-signature"
157
- onclick="popupCode('URIClassifier.src/M000052.html');return false;">
158
- <span class="method-name">inspect</span><span class="method-args">()</span>
159
- </a>
160
- </div>
161
-
162
- <div class="method-description">
163
- <p>
164
- Simply does an inspect that looks like a Hash inspect.
165
- </p>
166
- </div>
167
- </div>
168
-
169
- <div id="method-M000054" class="method-detail">
170
- <a name="M000054"></a>
171
-
172
- <div class="method-heading">
173
- <a href="URIClassifier.src/M000054.html" target="Code" class="method-signature"
174
- onclick="popupCode('URIClassifier.src/M000054.html');return false;">
175
- <span class="method-name">uc.register("/someuri", SampleHandler.new) &rarr; nil<br />
176
- </span>
177
- </a>
178
- </div>
179
-
180
- <div class="method-description">
181
- <p>
182
- Registers the SampleHandler (one for all requests) with the
183
- &quot;/someuri&quot;. When URIClassifier::resolve is called with
184
- &quot;/someuri&quot; it&#8217;ll return SampleHandler immediately. When
185
- called with &quot;/someuri/iwant&quot; it&#8217;ll also return SomeHandler
186
- immediatly, with no additional searches, but it will return path info with
187
- &quot;/iwant&quot;.
188
- </p>
189
- <p>
190
- You actually can reuse this class to register nearly anything and quickly
191
- resolve it. This could be used for caching, fast mapping, etc. The downside
192
- is it uses much more memory than a Hash, but it can be a lot faster.
193
- It&#8217;s main advantage is that it works on prefixes, which is damn hard
194
- to get right with a Hash.
195
- </p>
196
- </div>
197
- </div>
198
-
199
- <div id="method-M000056" class="method-detail">
200
- <a name="M000056"></a>
201
-
202
- <div class="method-heading">
203
- <a href="URIClassifier.src/M000056.html" target="Code" class="method-signature"
204
- onclick="popupCode('URIClassifier.src/M000056.html');return false;">
205
- <span class="method-name">uc.resolve("/someuri") &rarr; "/someuri", "", handler<br />
206
- uc.resolve("/someuri/pathinfo") &rarr; "/someuri", "/pathinfo", handler<br />
207
- uc.resolve("/notfound/orhere") &rarr; nil, nil, nil<br />
208
- uc.resolve("/") &rarr; "/", "/", handler # if uc.register("/", handler)<br />
209
- uc.resolve("/path/from/root") &rarr; "/", "/path/from/root", handler # if uc.register("/", handler) <br />
210
- </span>
211
- </a>
212
- </div>
213
-
214
- <div class="method-description">
215
- <p>
216
- Attempts to resolve either the whole URI or at the longest prefix,
217
- returning the prefix (as script_info), path (as path_info), and registered
218
- handler (usually an <a href="HttpHandler.html">HttpHandler</a>). If it
219
- doesn&#8217;t find a handler registered at the longest match then it
220
- returns nil,nil,nil.
221
- </p>
222
- <p>
223
- Because the resolver uses a trie you are able to register a handler at
224
- <b>any</b> character in the URI and it will be handled as long as
225
- it&#8217;s the longest prefix. So, if you registered handler 1 at
226
- &quot;/something/lik&quot;, and 2 at &quot;/something/like/that&quot;, then
227
- a a search for &quot;/something/like&quot; would give you 1. A search for
228
- &quot;/something/like/that/too&quot; would give you 2.
229
- </p>
230
- <p>
231
- This is very powerful since it means you can also attach handlers to parts
232
- of the ; (semi-colon) separated path params, any part of the path, use off
233
- chars, anything really. It also means that it&#8217;s very efficient to do
234
- this only taking as long as the URI has characters.
235
- </p>
236
- <p>
237
- A slight modification to the CGI 1.2 standard is given for handlers
238
- registered to &quot;/&quot;. CGI expects all CGI scripts to be at some
239
- script path, so it doesn&#8217;t really say anything about a script that
240
- handles the root. To make this work, the resolver will detect that the
241
- requested handler is at &quot;/&quot;, and return that for script_name, and
242
- then simply return the full URI back as path_info.
243
- </p>
244
- <p>
245
- It expects strings with no embedded &#8217;\0&#8217; characters.
246
- Don&#8216;t try other string-like stuff yet.
247
- </p>
248
- </div>
249
- </div>
250
-
251
- <div id="method-M000055" class="method-detail">
252
- <a name="M000055"></a>
253
-
254
- <div class="method-heading">
255
- <a href="URIClassifier.src/M000055.html" target="Code" class="method-signature"
256
- onclick="popupCode('URIClassifier.src/M000055.html');return false;">
257
- <span class="method-name">uc.unregister("/someuri")<br />
258
- </span>
259
- </a>
260
- </div>
261
-
262
- <div class="method-description">
263
- <p>
264
- Yep, just removes this uri and it&#8217;s handler from the trie.
265
- </p>
266
- </div>
267
- </div>
268
-
269
- <div id="method-M000051" class="method-detail">
270
- <a name="M000051"></a>
271
-
272
- <div class="method-heading">
273
- <a href="URIClassifier.src/M000051.html" target="Code" class="method-signature"
274
- onclick="popupCode('URIClassifier.src/M000051.html');return false;">
275
- <span class="method-name">uris</span><span class="method-args">()</span>
276
- </a>
277
- </div>
278
-
279
- <div class="method-description">
280
- <p>
281
- Returns the URIs that have been registered with this classifier so far. The
282
- URIs returned should not be modified as this will cause a memory leak. You
283
- can use this to inspect the contents of the <a
284
- href="URIClassifier.html">URIClassifier</a>.
285
- </p>
286
- </div>
287
- </div>
288
-
289
-
290
- </div>
291
-
292
-
293
- </div>
294
-
295
-
296
- <div id="validator-badges">
297
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
298
- </div>
299
-
300
- </body>
301
- </html>