Nicolas Ochem
2010-Jul-30 15:06 UTC
[Ovirt-devel] [PATCH 1/2] Monkey-patch mongrel to fix rails 2.3.5 incompatibility
Signed-off-by: Nicolas Ochem <nicolas.ochem at alcatel-lucent.com> --- src/config/initializers/mongrel_patch.rb | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 src/config/initializers/mongrel_patch.rb diff --git a/src/config/initializers/mongrel_patch.rb b/src/config/initializers/mongrel_patch.rb new file mode 100644 index 0000000..ae2bcf4 --- /dev/null +++ b/src/config/initializers/mongrel_patch.rb @@ -0,0 +1,11 @@ +# monkey patch to make mongrel compatible with rails 2.3.5 +# fixes faulty redirection issue. +# TODO : ditch mongrel and switch to passenger instead. +class Mongrel::CGIWrapper + def header_with_rails_fix(options = 'text/html') + @head['cookie'] = options.delete('cookie').flatten.map { |v| v.sub(/^\n/,'') } if options.class != String and options['cookie'] + header_without_rails_fix(options) + end + alias_method_chain(:header, :rails_fix) +end if (Rails.version == '2.3.5' or Rails.version == '2.3.8') and Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) and self.class.const_defined?(:Mongrel) + -- 1.7.2
nicolas.ochem at gmail.com
2010-Jul-30 15:44 UTC
[Ovirt-devel] [PATCH 1/2] Monkey-patch mongrel to fix rails 2.3.5 incompatibility
From: Nicolas Ochem <nicolas.ochem at alcatel-lucent.com> Signed-off-by: Nicolas Ochem <nicolas.ochem at alcatel-lucent.com> --- src/config/initializers/mongrel_patch.rb | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 src/config/initializers/mongrel_patch.rb diff --git a/src/config/initializers/mongrel_patch.rb b/src/config/initializers/mongrel_patch.rb new file mode 100644 index 0000000..ae2bcf4 --- /dev/null +++ b/src/config/initializers/mongrel_patch.rb @@ -0,0 +1,11 @@ +# monkey patch to make mongrel compatible with rails 2.3.5 +# fixes faulty redirection issue. +# TODO : ditch mongrel and switch to passenger instead. +class Mongrel::CGIWrapper + def header_with_rails_fix(options = 'text/html') + @head['cookie'] = options.delete('cookie').flatten.map { |v| v.sub(/^\n/,'') } if options.class != String and options['cookie'] + header_without_rails_fix(options) + end + alias_method_chain(:header, :rails_fix) +end if (Rails.version == '2.3.5' or Rails.version == '2.3.8') and Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) and self.class.const_defined?(:Mongrel) + -- 1.7.2
Apparently Analagous Threads
- [PATCH 1/1] Introduce an option to always pxe-boot a vm.
- [PATCH] Introduce ability to select any kind of nic model, not just default or virtio.
- Build fails due to missing ovirt-node-recipe.ks
- Build fails due to missing ovirt-node-recipe.ks
- Kernel Update and Ultra Monkey