mongrel 0.2.2 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. data/README +27 -25
  2. data/Rakefile +2 -3
  3. data/bin/mongrel_rails +114 -0
  4. data/doc/rdoc/classes/Mongrel.html +30 -0
  5. data/doc/rdoc/classes/Mongrel.src/M000001.html +18 -0
  6. data/doc/rdoc/classes/Mongrel/Const.html +2 -2
  7. data/doc/rdoc/classes/Mongrel/DirHandler.html +84 -21
  8. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000009.html +7 -18
  9. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000010.html +26 -9
  10. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000011.html +27 -26
  11. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000012.html +31 -0
  12. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000013.html +38 -0
  13. data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
  14. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000028.html → M000033.html} +4 -4
  15. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000029.html → M000034.html} +4 -4
  16. data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
  17. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000017.html → M000019.html} +4 -4
  18. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000018.html → M000020.html} +7 -7
  19. data/doc/rdoc/classes/Mongrel/HttpHandler.html +5 -5
  20. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000023.html → M000025.html} +3 -3
  21. data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
  22. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000002.html +5 -6
  23. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000003.html +7 -7
  24. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html +8 -20
  25. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000005.html +20 -6
  26. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000006.html +5 -5
  27. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000007.html +5 -6
  28. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000001.html → M000008.html} +6 -6
  29. data/doc/rdoc/classes/Mongrel/HttpRequest.html +5 -5
  30. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000030.html → M000035.html} +17 -17
  31. data/doc/rdoc/classes/Mongrel/HttpResponse.html +66 -21
  32. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000026.html +8 -6
  33. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000027.html +7 -12
  34. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000028.html +19 -0
  35. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000029.html +18 -0
  36. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000030.html +20 -0
  37. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000031.html +21 -0
  38. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000032.html +20 -0
  39. data/doc/rdoc/classes/Mongrel/HttpServer.html +28 -28
  40. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000014.html +18 -10
  41. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000015.html +51 -5
  42. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000016.html +9 -4
  43. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000017.html +18 -0
  44. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000018.html +18 -0
  45. data/doc/rdoc/classes/Mongrel/URIClassifier.html +31 -21
  46. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000021.html +18 -15
  47. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000022.html +25 -42
  48. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000023.html +36 -0
  49. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000024.html +84 -0
  50. data/doc/rdoc/created.rid +1 -1
  51. data/doc/rdoc/files/README.html +32 -42
  52. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  53. data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
  54. data/doc/rdoc/fr_method_index.html +35 -30
  55. data/examples/simpletest.rb +16 -6
  56. data/ext/http11/http11.c +19 -3
  57. data/ext/http11/tst_search.c +2 -3
  58. data/lib/mongrel.rb +108 -20
  59. data/test/test_uriclassifier.rb +22 -1
  60. metadata +25 -19
  61. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000008.html +0 -20
  62. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000024.html +0 -21
  63. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000025.html +0 -20
  64. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000012.html +0 -31
  65. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000013.html +0 -64
  66. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000019.html +0 -39
  67. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000020.html +0 -51
  68. data/lib/#mongrel.rb# +0 -493
@@ -86,10 +86,10 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000019">new</a>&nbsp;&nbsp;
90
- <a href="#M000020">register</a>&nbsp;&nbsp;
91
- <a href="#M000022">resolve</a>&nbsp;&nbsp;
92
- <a href="#M000021">unregister</a>&nbsp;&nbsp;
89
+ <a href="#M000021">new</a>&nbsp;&nbsp;
90
+ <a href="#M000022">register</a>&nbsp;&nbsp;
91
+ <a href="#M000024">resolve</a>&nbsp;&nbsp;
92
+ <a href="#M000023">unregister</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -111,12 +111,12 @@
111
111
  <div id="methods">
112
112
  <h3 class="section-bar">Public Class methods</h3>
113
113
 
114
- <div id="method-M000019" class="method-detail">
115
- <a name="M000019"></a>
114
+ <div id="method-M000021" class="method-detail">
115
+ <a name="M000021"></a>
116
116
 
117
117
  <div class="method-heading">
118
- <a href="URIClassifier.src/M000019.html" target="Code" class="method-signature"
119
- onclick="popupCode('URIClassifier.src/M000019.html');return false;">
118
+ <a href="URIClassifier.src/M000021.html" target="Code" class="method-signature"
119
+ onclick="popupCode('URIClassifier.src/M000021.html');return false;">
120
120
  <span class="method-name">URIClassifier.new &rarr; URIClassifier<br />
121
121
  </span>
122
122
  </a>
@@ -143,12 +143,12 @@ portion.
143
143
 
144
144
  <h3 class="section-bar">Public Instance methods</h3>
145
145
 
146
- <div id="method-M000020" class="method-detail">
147
- <a name="M000020"></a>
146
+ <div id="method-M000022" class="method-detail">
147
+ <a name="M000022"></a>
148
148
 
149
149
  <div class="method-heading">
150
- <a href="URIClassifier.src/M000020.html" target="Code" class="method-signature"
151
- onclick="popupCode('URIClassifier.src/M000020.html');return false;">
150
+ <a href="URIClassifier.src/M000022.html" target="Code" class="method-signature"
151
+ onclick="popupCode('URIClassifier.src/M000022.html');return false;">
152
152
  <span class="method-name">uc.register("/someuri", SampleHandler.new) &rarr; nil<br />
153
153
  </span>
154
154
  </a>
@@ -173,15 +173,17 @@ to get right with a Hash.
173
173
  </div>
174
174
  </div>
175
175
 
176
- <div id="method-M000022" class="method-detail">
177
- <a name="M000022"></a>
176
+ <div id="method-M000024" class="method-detail">
177
+ <a name="M000024"></a>
178
178
 
179
179
  <div class="method-heading">
180
- <a href="URIClassifier.src/M000022.html" target="Code" class="method-signature"
181
- onclick="popupCode('URIClassifier.src/M000022.html');return false;">
180
+ <a href="URIClassifier.src/M000024.html" target="Code" class="method-signature"
181
+ onclick="popupCode('URIClassifier.src/M000024.html');return false;">
182
182
  <span class="method-name">uc.resolve("/someuri") &rarr; "/someuri", "", handler<br />
183
183
  uc.resolve("/someuri/pathinfo") &rarr; "/someuri", "/pathinfo", handler<br />
184
184
  uc.resolve("/notfound/orhere") &rarr; nil, nil, nil<br />
185
+ uc.resolve("/") &rarr; "/", "/", handler # if uc.register("/", handler)<br />
186
+ uc.resolve("/path/from/root") &rarr; "/", "/path/from/root", handler # if uc.register("/", handler) <br />
185
187
  </span>
186
188
  </a>
187
189
  </div>
@@ -209,18 +211,26 @@ chars, anything really. It also means that it&#8217;s very efficient to do
209
211
  this only taking as long as the URI has characters.
210
212
  </p>
211
213
  <p>
214
+ A slight modification to the CGI 1.2 standard is given for handlers
215
+ registered to &quot;/&quot;. CGI expects all CGI scripts to be at some
216
+ script path, so it doesn&#8217;t really say anything about a script that
217
+ handles the root. To make this work, the resolver will detect that the
218
+ requested handler is at &quot;/&quot;, and return that for script_name, and
219
+ then simply return the full URI back as path_info.
220
+ </p>
221
+ <p>
212
222
  It expects strings with no embedded &#8217;\0&#8217; characters.
213
- Don&#8216;t try other string-line stuff yet.
223
+ Don&#8216;t try other string-like stuff yet.
214
224
  </p>
215
225
  </div>
216
226
  </div>
217
227
 
218
- <div id="method-M000021" class="method-detail">
219
- <a name="M000021"></a>
228
+ <div id="method-M000023" class="method-detail">
229
+ <a name="M000023"></a>
220
230
 
221
231
  <div class="method-heading">
222
- <a href="URIClassifier.src/M000021.html" target="Code" class="method-signature"
223
- onclick="popupCode('URIClassifier.src/M000021.html');return false;">
232
+ <a href="URIClassifier.src/M000023.html" target="Code" class="method-signature"
233
+ onclick="popupCode('URIClassifier.src/M000023.html');return false;">
224
234
  <span class="method-name">uc.unregister("/someuri")<br />
225
235
  </span>
226
236
  </a>
@@ -5,32 +5,35 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>unregister (Mongrel::URIClassifier)</title>
8
+ <title>new (Mongrel::URIClassifier)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
13
  <pre>/**
14
14
  * call-seq:
15
- * uc.unregister(&quot;/someuri&quot;)
15
+ * URIClassifier.new -&gt; URIClassifier
16
+ *
17
+ * Initializes a new URIClassifier object that you can use to associate URI sequences
18
+ * with objects. You can actually use it with any string sequence and any objects,
19
+ * but it's mostly used with URIs.
20
+ *
21
+ * It uses TST from http://www.octavian.org/cs/software.html to build an ternary search
22
+ * trie to hold all of the URIs. It uses this to do an initial search for the a URI
23
+ * prefix, and then to break the URI into SCRIPT_NAME and PATH_INFO portions. It actually
24
+ * will do two searches most of the time in order to find the right handler for the
25
+ * registered prefix portion.
16
26
  *
17
- * Yep, just removes this uri and it's handler from the trie.
18
27
  */
19
- VALUE URIClassifier_unregister(VALUE self, VALUE uri)
28
+ VALUE URIClassifier_init(VALUE self)
20
29
  {
21
- void *handler = NULL;
22
- struct tst *tst = NULL;
23
- DATA_GET(self, struct tst, tst);
24
-
25
- handler = tst_delete((unsigned char *)StringValueCStr(uri), tst);
30
+ VALUE hash;
26
31
 
27
- if(handler) {
28
- rb_hash_delete(rb_ivar_get(self, id_handler_map), uri);
32
+ // we create an internal hash to protect stuff from the GC
33
+ hash = rb_hash_new();
34
+ rb_ivar_set(self, id_handler_map, hash);
29
35
 
30
- return (VALUE)handler;
31
- } else {
32
- return Qnil;
33
- }
36
+ return self;
34
37
  }</pre>
35
38
  </body>
36
39
  </html>
@@ -5,64 +5,47 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>resolve (Mongrel::URIClassifier)</title>
8
+ <title>register (Mongrel::URIClassifier)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
13
  <pre>/**
14
14
  * call-seq:
15
- * uc.resolve(&quot;/someuri&quot;) -&gt; &quot;/someuri&quot;, &quot;&quot;, handler
16
- * uc.resolve(&quot;/someuri/pathinfo&quot;) -&gt; &quot;/someuri&quot;, &quot;/pathinfo&quot;, handler
17
- * uc.resolve(&quot;/notfound/orhere&quot;) -&gt; nil, nil, nil
15
+ * uc.register(&quot;/someuri&quot;, SampleHandler.new) -&gt; nil
18
16
  *
19
- * Attempts to resolve either the whole URI or at the longest prefix, returning
20
- * the prefix (as script_info), path (as path_info), and registered handler
21
- * (usually an HttpHandler). If it doesn't find a handler registered at the longest
22
- * match then it returns nil,nil,nil.
17
+ * Registers the SampleHandler (one for all requests) with the &quot;/someuri&quot;.
18
+ * When URIClassifier::resolve is called with &quot;/someuri&quot; it'll return
19
+ * SampleHandler immediately. When called with &quot;/someuri/iwant&quot; it'll also
20
+ * return SomeHandler immediatly, with no additional searches, but it will
21
+ * return path info with &quot;/iwant&quot;.
23
22
  *
24
- * Because the resolver uses a trie you are able to register a handler at *any* character
25
- * in the URI and it will be handled as long as it's the longest prefix. So, if you
26
- * registered handler #1 at &quot;/something/lik&quot;, and #2 at &quot;/something/like/that&quot;, then a
27
- * a search for &quot;/something/like&quot; would give you #1. A search for &quot;/something/like/that/too&quot;
28
- * would give you #2.
29
- *
30
- * This is very powerful since it means you can also attach handlers to parts of the ;
31
- * (semi-colon) separated path params, any part of the path, use off chars, anything really.
32
- * It also means that it's very efficient to do this only taking as long as the URI has
33
- * characters.
34
- *
35
- * It expects strings with no embedded '\0' characters. Don't try other string-line stuff yet.
23
+ * You actually can reuse this class to register nearly anything and
24
+ * quickly resolve it. This could be used for caching, fast mapping, etc.
25
+ * The downside is it uses much more memory than a Hash, but it can be
26
+ * a lot faster. It's main advantage is that it works on prefixes, which
27
+ * is damn hard to get right with a Hash.
36
28
  */
37
- VALUE URIClassifier_resolve(VALUE self, VALUE uri)
29
+ VALUE URIClassifier_register(VALUE self, VALUE uri, VALUE handler)
38
30
  {
39
- void *handler = NULL;
40
- int pref_len = 0;
31
+ int rc = 0;
32
+ void *ptr = NULL;
41
33
  struct tst *tst = NULL;
42
- VALUE result;
43
- unsigned char *uri_str = NULL;
44
- unsigned char *script_name_str = NULL;
45
-
46
34
  DATA_GET(self, struct tst, tst);
47
- uri_str = (unsigned char *)StringValueCStr(uri);
48
-
49
- handler = tst_search(uri_str, tst, &amp;pref_len);
50
35
 
51
- // setup for multiple return values
52
- result = rb_ary_new();
36
+ rc = tst_insert((unsigned char *)StringValueCStr(uri), (void *)handler , tst, 0, &amp;ptr);
53
37
 
54
- if(handler) {
55
- rb_ary_push(result, rb_str_substr (uri, 0, pref_len));
56
- rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)-&gt;len));
57
- rb_ary_push(result, (VALUE)handler);
58
- } else {
59
- // not found so push back nothing
60
- rb_ary_push(result, Qnil);
61
- rb_ary_push(result, Qnil);
62
- rb_ary_push(result, Qnil);
38
+ if(rc == TST_DUPLICATE_KEY) {
39
+ rb_raise(rb_eStandardError, &quot;Handler already registered with that name&quot;);
40
+ } else if(rc == TST_ERROR) {
41
+ rb_raise(rb_eStandardError, &quot;Memory error registering handler&quot;);
42
+ } else if(rc == TST_NULL_KEY) {
43
+ rb_raise(rb_eStandardError, &quot;URI was empty&quot;);
63
44
  }
45
+
46
+ rb_hash_aset(rb_ivar_get(self, id_handler_map), uri, handler);
64
47
 
65
- return result;
48
+ return Qnil;
66
49
  }</pre>
67
50
  </body>
68
51
  </html>
@@ -0,0 +1,36 @@
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::URIClassifier)</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>/**
14
+ * call-seq:
15
+ * uc.unregister(&quot;/someuri&quot;)
16
+ *
17
+ * Yep, just removes this uri and it's handler from the trie.
18
+ */
19
+ VALUE URIClassifier_unregister(VALUE self, VALUE uri)
20
+ {
21
+ void *handler = NULL;
22
+ struct tst *tst = NULL;
23
+ DATA_GET(self, struct tst, tst);
24
+
25
+ handler = tst_delete((unsigned char *)StringValueCStr(uri), tst);
26
+
27
+ if(handler) {
28
+ rb_hash_delete(rb_ivar_get(self, id_handler_map), uri);
29
+
30
+ return (VALUE)handler;
31
+ } else {
32
+ return Qnil;
33
+ }
34
+ }</pre>
35
+ </body>
36
+ </html>
@@ -0,0 +1,84 @@
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>resolve (Mongrel::URIClassifier)</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>/**
14
+ * call-seq:
15
+ * uc.resolve(&quot;/someuri&quot;) -&gt; &quot;/someuri&quot;, &quot;&quot;, handler
16
+ * uc.resolve(&quot;/someuri/pathinfo&quot;) -&gt; &quot;/someuri&quot;, &quot;/pathinfo&quot;, handler
17
+ * uc.resolve(&quot;/notfound/orhere&quot;) -&gt; nil, nil, nil
18
+ * uc.resolve(&quot;/&quot;) -&gt; &quot;/&quot;, &quot;/&quot;, handler # if uc.register(&quot;/&quot;, handler)
19
+ * uc.resolve(&quot;/path/from/root&quot;) -&gt; &quot;/&quot;, &quot;/path/from/root&quot;, handler # if uc.register(&quot;/&quot;, handler)
20
+ *
21
+ * Attempts to resolve either the whole URI or at the longest prefix, returning
22
+ * the prefix (as script_info), path (as path_info), and registered handler
23
+ * (usually an HttpHandler). If it doesn't find a handler registered at the longest
24
+ * match then it returns nil,nil,nil.
25
+ *
26
+ * Because the resolver uses a trie you are able to register a handler at *any* character
27
+ * in the URI and it will be handled as long as it's the longest prefix. So, if you
28
+ * registered handler #1 at &quot;/something/lik&quot;, and #2 at &quot;/something/like/that&quot;, then a
29
+ * a search for &quot;/something/like&quot; would give you #1. A search for &quot;/something/like/that/too&quot;
30
+ * would give you #2.
31
+ *
32
+ * This is very powerful since it means you can also attach handlers to parts of the ;
33
+ * (semi-colon) separated path params, any part of the path, use off chars, anything really.
34
+ * It also means that it's very efficient to do this only taking as long as the URI has
35
+ * characters.
36
+ *
37
+ * A slight modification to the CGI 1.2 standard is given for handlers registered to &quot;/&quot;.
38
+ * CGI expects all CGI scripts to be at some script path, so it doesn't really say anything
39
+ * about a script that handles the root. To make this work, the resolver will detect that
40
+ * the requested handler is at &quot;/&quot;, and return that for script_name, and then simply return
41
+ * the full URI back as path_info.
42
+ *
43
+ * It expects strings with no embedded '\0' characters. Don't try other string-like stuff yet.
44
+ */
45
+ VALUE URIClassifier_resolve(VALUE self, VALUE uri)
46
+ {
47
+ void *handler = NULL;
48
+ int pref_len = 0;
49
+ struct tst *tst = NULL;
50
+ VALUE result;
51
+ unsigned char *uri_str = NULL;
52
+ unsigned char *script_name_str = NULL;
53
+
54
+ DATA_GET(self, struct tst, tst);
55
+ uri_str = (unsigned char *)StringValueCStr(uri);
56
+
57
+ handler = tst_search(uri_str, tst, &amp;pref_len);
58
+
59
+ // setup for multiple return values
60
+ result = rb_ary_new();
61
+
62
+ if(handler) {
63
+ rb_ary_push(result, rb_str_substr (uri, 0, pref_len));
64
+ // compensate for a script_name=&quot;/&quot; where we need to add the &quot;/&quot; to path_info to keep it consistent
65
+ if(pref_len == 1 &amp;&amp; uri_str[0] == '/') {
66
+ // matches the root URI so we have to use the whole URI as the path_info
67
+ rb_ary_push(result, uri);
68
+ } else {
69
+ // matches a script so process like normal
70
+ rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)-&gt;len));
71
+ }
72
+
73
+ rb_ary_push(result, (VALUE)handler);
74
+ } else {
75
+ // not found so push back nothing
76
+ rb_ary_push(result, Qnil);
77
+ rb_ary_push(result, Qnil);
78
+ rb_ary_push(result, Qnil);
79
+ }
80
+
81
+ return result;
82
+ }</pre>
83
+ </body>
84
+ </html>
@@ -1 +1 @@
1
- Fri Feb 03 01:14:07 EST 2006
1
+ Fri Feb 10 02:50:17 EST 2006
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Fri Feb 03 01:13:51 EST 2006</td>
59
+ <td>Fri Feb 10 02:18:14 EST 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -84,38 +84,41 @@ portability issues.
84
84
  </p>
85
85
  <h2>Status</h2>
86
86
  <p>
87
- The 0.2.2 release of <a href="../classes/Mongrel.html">Mongrel</a> features
88
- an HTTP core server that is the fastest possible thing I could get without
89
- using something other than Ruby. It features a few bug fixes, but mostly
90
- just a change to the <a
91
- href="../classes/Mongrel/HttpResponse.html">Mongrel::HttpResponse</a> class
92
- to make it more feature complete. The remaining development will be spent
93
- getting <a href="../classes/Mongrel.html">Mongrel</a> to work with other
94
- frameworks, adding additional needed features, and improving the
95
- concurrency and speed.
87
+ The 0.3 release is the first official release to start supporting Ruby on
88
+ Rails and to have a more complete DirHandler for serving directories of
89
+ files. This release is actually closer to a full functioning web server
90
+ than the previous releases.
96
91
  </p>
97
92
  <p>
98
- The current release has samples from &quot;why the lucky stiff&quot; for
99
- his Camping framework in the examples directory. Camping is a small micro
100
- framework (<a
101
- href="http://rubyforge.org/projects/camping">rubyforge.org/projects/camping</a>)
102
- which should work with <a href="../classes/Mongrel.html">Mongrel</a> if you
103
- use the subversion source for Camping.
93
+ The Rails support is pretty rough right now, but check out the
94
+ bin/mongrel_rails file, which should be installed into your PATH if you use
95
+ a gem. You should be able to do the following to run your Rails
96
+ applications:
104
97
  </p>
98
+ <pre>
99
+ &gt; cd myrailsapp
100
+ &gt; mongrel_rails 0.0.0.0 3000
101
+ </pre>
105
102
  <p>
106
- This is also the first release onto the new <a
107
- href="../classes/Mongrel.html">Mongrel</a> RubyForge project page found at
108
- <a
109
- href="http://rubyforge.org/projects/mongrel">rubyforge.org/projects/mongrel</a>/
110
- thanks to Tom Copland. I&#8217;ll be looking to automate management of
111
- this, but feel free to use rubyforge to post feature requests, bugs, and
112
- join the mailing list.
103
+ And then hit <a href="http://localhost:3000">localhost:3000</a>/ to see
104
+ your app. One thing is that if you have a public/index.html file then
105
+ you&#8217;ll get that served instead of your Rails application.
113
106
  </p>
114
107
  <p>
115
- Finally, it now supports all CGI parameters that don&#8217;t cause a
116
- performance hit, and it has a <a
117
- href="../classes/Mongrel/DirHandler.html">Mongrel::DirHandler</a> which can
118
- serve files out of a directory and do (optional) directory listings.
108
+ People with the daemons gem installed will see that mongrel_rails will go
109
+ into the background. You can kill it with:
110
+ </p>
111
+ <pre>
112
+ &gt; kill -TERM `cat log/mongrel-3000.pid`
113
+ </pre>
114
+ <p>
115
+ Where &quot;3000&quot; is whatever port you told it to listen on when you
116
+ ran it.
117
+ </p>
118
+ <p>
119
+ The file serving is still a little rough and the redirects might not work
120
+ well, but try it out and tell me about any weird errors. File uploads will
121
+ definitely have some problems.
119
122
  </p>
120
123
  <h2>Install</h2>
121
124
  <p>
@@ -203,12 +206,6 @@ applications in a heavily utilized production environment. Right now
203
206
  I&#8217;m looking at:
204
207
  </p>
205
208
  <ul>
206
- <li>Fast static file handling with directory listings.
207
-
208
- </li>
209
- <li>More testing on more platforms.
210
-
211
- </li>
212
209
  <li>An idea I&#8217;ve had for an insane caching handler which could speed up
213
210
  quite a
214
211
 
@@ -217,14 +214,6 @@ quite a
217
214
  <p>
218
215
  few deployments.
219
216
  </p>
220
- <ul>
221
- <li>General little things most web servers need.
222
-
223
- </li>
224
- <li>A nice management system or interface for controlling mongrel servers.
225
-
226
- </li>
227
- </ul>
228
217
  <p>
229
218
  Overall though the goal of <a href="../classes/Mongrel.html">Mongrel</a> is
230
219
  to be just enough HTTP to serve a Ruby web application that sits behind a
@@ -238,7 +227,8 @@ hosting the major web frameworks for Ruby:
238
227
  <li>Ruby on Rails &#8212; that&#8217;s where my bread is buttered right now.
239
228
 
240
229
  </li>
241
- <li>Nitro &#8212; George is a nice guy, and Nitro is thread safe. Might be fun.
230
+ <li>Nitro &#8212; Nitro folks have already hooked this up and started using it.
231
+ Nice.
242
232
 
243
233
  </li>
244
234
  <li>????? &#8212; Others people might be interested in.