about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--doc/site/src/default.template2
-rw-r--r--doc/site/src/news.page4
-rw-r--r--doc/site/src/security.page4
-rw-r--r--ext/http11/http11.c2
-rw-r--r--ext/http11/http11_parser.rl2
-rw-r--r--lib/mongrel.rb1
6 files changed, 8 insertions, 7 deletions
diff --git a/doc/site/src/default.template b/doc/site/src/default.template
index 2c32028..e18bbc9 100644
--- a/doc/site/src/default.template
+++ b/doc/site/src/default.template
@@ -49,7 +49,7 @@
 
           <dt>Apr-3-2006</dt>
           <dd>
-            <h5><a href="{relocatable: news.html}">Mongrel 0.3.12.1 -- Iron Mongrel</a></h5>
+            <h5><a href="{relocatable: news.html}">Mongrel 0.3.12.2 -- Iron Mongrel</a></h5>
 
             <p>This release is the result of pounding the crap out of Mongrel since the
             last release to make it more robust in the face of really bad traffic.  It is
diff --git a/doc/site/src/news.page b/doc/site/src/news.page
index e5121fd..73bd28d 100644
--- a/doc/site/src/news.page
+++ b/doc/site/src/news.page
@@ -7,7 +7,7 @@ ordering: 2
 
 h1. Latest News
 
-h2. Apr-3:  Mongrel 0.3.12.1 -- Iron Mongrel
+h2. Apr-3:  Mongrel 0.3.12.2 -- Iron Mongrel
 
 !/images/iron_mongrel.jpg!
 
@@ -23,7 +23,7 @@ methods used are:
 
 The end result is a lot of little fixes which make Mongrel more robust against
 badly behaving clients and possibly against many potential security risks in
-the future.  In general Mongrel 0.3.12.1 behaves more consistently compared
+the future.  In general Mongrel 0.3.12.2 behaves more consistently compared
 to past releases when given random data or maliciously formatted data.
 
 The main changes are related to how IO is processed and how the HTTP parser rejects
diff --git a/doc/site/src/security.page b/doc/site/src/security.page
index c040e1a..cb61c85 100644
--- a/doc/site/src/security.page
+++ b/doc/site/src/security.page
@@ -73,9 +73,9 @@ authors or contact me to see if it's an error on Mongrel's part.
 
 h2. Protocol Error Reporting
 
-The 0.3.12.1 release was the first Iron Mongrel release, but it isn't perfect
+The 0.3.12.2 release was the first Iron Mongrel release, but it isn't perfect
 for sure.  To make sure that it doesn't prevent people from making tons of
-money the 0.3.12.1 release will report what data caused the parser to fail.
+money the 0.3.12.2 release will report what data caused the parser to fail.
 If you see a legit request that causes the parser to choke then send it to
 me and I'll take a look.
 
diff --git a/ext/http11/http11.c b/ext/http11/http11.c
index 9e2cc6f..ffdbee3 100644
--- a/ext/http11/http11.c
+++ b/ext/http11/http11.c
@@ -135,7 +135,7 @@ void header_done(void *data, const char *at, size_t length)
 
   ctype = rb_hash_aref(req, global_http_content_type);
   if(ctype != Qnil) {
-    rb_hash_aset(req, global_content_type, Qnil);
+    rb_hash_aset(req, global_content_type, ctype);
   }
 
   rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value);
diff --git a/ext/http11/http11_parser.rl b/ext/http11/http11_parser.rl
index 6a256a6..af3a444 100644
--- a/ext/http11/http11_parser.rl
+++ b/ext/http11/http11_parser.rl
@@ -99,7 +99,7 @@
 
         field_value = any* >start_value %write_value;
 
-        message_header = field_name ":" field_value $0 CRLF >1;
+        message_header = field_name ":" field_value :> CRLF;
         
         Request = Request_Line (message_header)* ( CRLF @done);
 
diff --git a/lib/mongrel.rb b/lib/mongrel.rb
index 47b3b27..500c62d 100644
--- a/lib/mongrel.rb
+++ b/lib/mongrel.rb
@@ -420,6 +420,7 @@ module Mongrel
               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)