about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-31 20:12:30 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-31 20:12:30 +0000
commit6d1c93465b1c46acb9ede4bd0dbf3ab360981e6a (patch)
tree21668a648b3da21902c9b3aebaeb14140c1985a5
parent1793acbedd62cf3aac9fd1ed3e36dde3654c920f (diff)
downloadunicorn-6d1c93465b1c46acb9ede4bd0dbf3ab360981e6a.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@134 19e92222-5c0b-0410-8929-a290d50e31e9
-rw-r--r--Rakefile2
-rw-r--r--doc/site/src/default.template10
-rw-r--r--doc/site/src/news.page31
-rw-r--r--ext/http11/http11.c4
-rw-r--r--lib/mongrel.rb6
5 files changed, 47 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index dad9f7b..4d98603 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,7 +32,7 @@ end
 setup_extension("http11", "http11")
 
 name="mongrel"
-version="0.3.12"
+version="0.3.12.1"
 
 setup_gem(name, version) do |spec|
   spec.summary = "A small fast HTTP library and server that runs Rails, Camping, and Nitro apps."
diff --git a/doc/site/src/default.template b/doc/site/src/default.template
index 5c2d783..a96ffe0 100644
--- a/doc/site/src/default.template
+++ b/doc/site/src/default.template
@@ -47,6 +47,16 @@
 
         <dl>
 
+          <dt>Mar-30-2006</dt>
+          <dd>
+            <h5><a href="{relocatable: news.html}">Mongrel 0.3.12 -- Pre-Release</a></h5>
+
+            <p>The official 0.3.12 release of Mongrel is here.  This release is hot, but test test test.
+              Should support Rails 1.1 and has lots of debugging and tweaks.</p>
+
+              <a href="{relocatable: news.html}"><img src="{relocatable: images/li4.gif}" alt="more" /><br /></a></p>
+          </dd>
+
           <dt>Mar-27-2006</dt>
           <dd>
             <h5><a href="{relocatable: news.html}">Mongrel 0.3.12 -- Pre-Release</a></h5>
diff --git a/doc/site/src/news.page b/doc/site/src/news.page
index 04935d3..956dacd 100644
--- a/doc/site/src/news.page
+++ b/doc/site/src/news.page
@@ -7,6 +7,37 @@ ordering: 2
 
 h1. Latest News
 
+h2. Mar-30:   Mongrel 0.3.12 -- OFFICIAL Release
+
+This is the long awaited (like 2 weeks) 0.3.12 release of Mongrel.  This release
+has received heavier testing than previous releases and supports a whole raft of
+improvements to existing functionality plus some new stuff.  The big points of this
+release are:
+
+* The Mongrel::Configurator and Mongrel::Rails::Configurator for simple configuration (mostly for frameworks to use).
+* Dynamically loadable handlers from the GemPlugins system.  Next release will let you write and add your own handlers.
+* Chained handlers.  That's right, you can stack a series of handlers on any URIs and they'll be processed in order.  This gives you an advanced and fast pipe-lined processing system and is already used to implement the extensive debugging support Mongrel has.
+* Debugging, Debugging, Debugging.  Try the -B option and then look in the log/mongrel_debug logs.  I'll be beefing this up to insane usefulness for the 0.3.13 release.
+* Support for sendfile on FreeBSD, Linux, and Solaris if you install the "ruby-sendfile":http://rubyforge.org/projects/ruby-sendfile gem.  This is experimental but already gives a 20% boost on static files.
+* Additional proper headers for static files from the DirHandler in order to allow browsers to cache the content.  People using Mongrel for development or small sites will love this combined with the sendfile support.
+* Lots and lots of little tweaks to improve speed.  Mongrel is starting to hit a wall again with performance so I'll be looking for new hot-spots to move to C in the near future.
+* Initial support for Rails 1.1.  Remember *if you use Typo it is broken not Mongrel*.  Typo is being frantically fixed so be patient.
+* Fix for a bad typo on Win32 that prevented people from using additional mime types files (stupid Emacs and it's damn capitalize command being exactly the same as Copy in every other editor).
+* Ability to specify a timeout throttling setting and a max number of concurrent connections with additional attempts at cleaning dead threads out.  Future debugging will help people spot these.
+* Lots of new Camping support and integration (thanks to Trotter Cashion for using Mongrel with Camping like crazy).
+* A handy -C option for the mongrel_rails script that lets you specify the options you'd normally do on the command line as a YAML hash.  More on this later.
+
+Everyone can go "download 0.3.12":http://rubyforge.org/frs/?group_id=1306 like normal or do the usual
+"gem install mongrel" or "gem update" to get the latest and greatest.
+
+ If you followed pre-release please uninstall first.
+
+Enjoy and report those bugs!
+
+h3. Next Stop, Funded
+
+The next steps with Mongrel will be to add the capability for users of Mongrel to write their own Configurator scripts and to test the living daylights out of it.  If you missed my last announcement, Mongrel is getting *commercial sponsorship* from EastMedia (http://www.eastmedia.com/) in partnership with VeriSign (http://www.verisign.com/) for use in a potentially large scale project.  My role in this is to make sure Mongrel can handle the required role and will not ever crash.  I'll be spending the next few weeks putting out less features and doing more stability and speed tweaks.  Stay tuned.  Should be fun.
+
 h2. Mar-27:   Mongrel 0.3.12 -- Pre-Release
 
 This release is a little different as it's larger than previous releases and
diff --git a/ext/http11/http11.c b/ext/http11/http11.c
index b04012e..99bca06 100644
--- a/ext/http11/http11.c
+++ b/ext/http11/http11.c
@@ -23,7 +23,6 @@ static VALUE global_http_content_type;
 static VALUE global_gateway_interface;
 static VALUE global_gateway_interface_value;
 static VALUE global_interface_value;
-static VALUE global_remote_address;
 static VALUE global_server_name;
 static VALUE global_server_port;
 static VALUE global_server_protocol;
@@ -471,13 +470,12 @@ void Init_http11()
   DEF_GLOBAL(http_content_type, "HTTP_CONTENT_TYPE");
   DEF_GLOBAL(gateway_interface, "GATEWAY_INTERFACE");
   DEF_GLOBAL(gateway_interface_value, "CGI/1.2");
-  DEF_GLOBAL(remote_address, "REMOTE_ADDR");
   DEF_GLOBAL(server_name, "SERVER_NAME");
   DEF_GLOBAL(server_port, "SERVER_PORT");
   DEF_GLOBAL(server_protocol, "SERVER_PROTOCOL");
   DEF_GLOBAL(server_protocol_value, "HTTP/1.1");
   DEF_GLOBAL(http_host, "HTTP_HOST");
-  DEF_GLOBAL(mongrel_version, "Mongrel 0.3.12");
+  DEF_GLOBAL(mongrel_version, "Mongrel 0.3.12.1");
   DEF_GLOBAL(server_software, "SERVER_SOFTWARE");
   DEF_GLOBAL(port_80, "80");
 
diff --git a/lib/mongrel.rb b/lib/mongrel.rb
index 34f610b..e3f7653 100644
--- a/lib/mongrel.rb
+++ b/lib/mongrel.rb
@@ -99,7 +99,7 @@ module Mongrel
     # The original URI requested by the client.  Passed to URIClassifier to build PATH_INFO and SCRIPT_NAME.
     REQUEST_URI='REQUEST_URI'.freeze
 
-    MONGREL_VERSION="0.3.12".freeze
+    MONGREL_VERSION="0.3.12.1".freeze
 
     # The standard empty 404 response for bad requests.  Use Error4040Handler for custom stuff.
     ERROR_404_RESPONSE="HTTP/1.1 404 Not Found\r\nConnection: close\r\nServer: #{MONGREL_VERSION}\r\n\r\nNOT FOUND".freeze
@@ -128,6 +128,8 @@ module Mongrel
     ETAG_FORMAT="\"%x-%x-%x\"".freeze
     HEADER_FORMAT="%s: %s\r\n".freeze
     LINE_END="\r\n".freeze
+    REMOTE_ADDR="REMOTE_ADDR".freeze
+    HTTP_X_FORWARDED_FOR="HTTP_X_FORWARDED_FOR".freeze
   end
 
 
@@ -409,7 +411,7 @@ module Mongrel
             if handlers
               params[Const::PATH_INFO] = path_info
               params[Const::SCRIPT_NAME] = script_name
-
+              params[Const::REMOTE_ADDR] = params[Const::HTTP_X_FORWARDED_FOR] || client.peeraddr.last
               request = HttpRequest.new(params, data[nread ... data.length], client)
               response = HttpResponse.new(client)