about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--Rakefile40
-rw-r--r--ext/http11/http11.c2
3 files changed, 26 insertions, 18 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fcdf1ba..a578579 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
 
+v1.1.3. Fix security flaw of DirHandler; reported on mailing list.
+
 v1.1.2. Fix worker termination bug; fix JRuby 1.0.3 load order issue; fix require issue on systems without Rubygems.
 
 v1.1.1. Fix mongrel_rails restart bug; fix bug with Rack status codes.
diff --git a/Rakefile b/Rakefile
index def399b..9614194 100644
--- a/Rakefile
+++ b/Rakefile
@@ -2,6 +2,7 @@
 require 'rubygems'
 gem 'echoe', '>=2.7.5'
 require 'echoe'
+FORCE_PURE = ENV['FORCE_PURE'] || false
 
 e = Echoe.new("mongrel") do |p|
   p.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
@@ -9,7 +10,7 @@ e = Echoe.new("mongrel") do |p|
   p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'lib/http11.jar', 'ext/http11_java/classes', 'coverage']
   p.rdoc_pattern = ['README', 'LICENSE', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
   p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
-  p.ruby_version = '>= 1.8.4'
+  p.ruby_version = '>=1.8.4'
   p.dependencies = ['gem_plugin >=0.2.3']  
   p.extension_pattern = nil
   p.certificate_chain = ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
@@ -20,29 +21,34 @@ e = Echoe.new("mongrel") do |p|
 
   case RUBY_PLATFORM
     when /mswin/
-      # p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
-      #  '~/gem_certificates/luislavena-mongrel-public_cert.pem']    
+      p.certificate_chain = [
+        '~/projects/gem_certificates/mongrel-public_cert.pem',
+        '~/projects/gem_certificates/luislavena-mongrel-public_cert.pem'
+      ]
     when /java/
     else
       p.extension_pattern = ["ext/**/extconf.rb"]
   end
 
-  p.eval = proc do
-    case RUBY_PLATFORM
-    when /mswin/
-      self.files += ['lib/http11.so']
-      self.platform = Gem::Platform::WIN32
-      add_dependency('cgi_multipart_eof_fix', '>= 2.4')
-    when /java/
-      self.files += ['lib/http11.jar']
-      self.platform = 'jruby'
-    else
-      add_dependency('daemons', '>= 1.0.3')
-      add_dependency('fastthread', '>= 1.0.1')
-      add_dependency('cgi_multipart_eof_fix', '>= 2.4')
+  unless FORCE_PURE
+    p.eval = proc do
+      case RUBY_PLATFORM
+      when /mswin/
+        self.files += ['lib/http11.so']
+        self.platform = Gem::Platform::CURRENT
+        add_dependency('cgi_multipart_eof_fix', '>= 2.4')
+      when /java/
+        self.files += ['lib/http11.jar']
+        self.platform = 'jruby'
+      else
+        add_dependency('daemons', '>= 1.0.3')
+        add_dependency('fastthread', '>= 1.0.1')
+        add_dependency('cgi_multipart_eof_fix', '>= 2.4')
+      end
     end
+  else
+    p.extension_pattern = ["ext/**/extconf.rb"]
   end
-
 end
 
 #### Ragel builder
diff --git a/ext/http11/http11.c b/ext/http11/http11.c
index b93a715..6603745 100644
--- a/ext/http11/http11.c
+++ b/ext/http11/http11.c
@@ -384,7 +384,7 @@ void Init_http11()
   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 1.1.2"); /* XXX Why is this defined here? */
+  DEF_GLOBAL(mongrel_version, "Mongrel 1.1.3"); /* XXX Why is this defined here? */
   DEF_GLOBAL(server_software, "SERVER_SOFTWARE");
   DEF_GLOBAL(port_80, "80");