Package: camping Version: 2.1.498-3 Severity: grave Tags: patch upstream Justification: renders package unusable
Hi, Currently, it is not possible in Debian to use the Camping framework to write/create an application that supports HTTP POST next to GET nor to use/run Camping webapps that use POST. This only holds when using Camping server and not other deployment methods. However, it is obviously a must for it to work during development. The problem is caused by the fact that the Rack::File middleware, used for serving static files, is chained before the app and this middleware logically doesn't support POST and throws a HTTP 405 error which is subsequently not handled. The patch attached ensures that HTTP 405 is ignored and the POST request is propagated to the Camping app. Cheers, Paul -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (102, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages camping depends on: ii ruby 4.9 ii ruby-rack 1.4.1-2 ii ruby1.8 [ruby-interpreter] 1.8.7.358-4 ii ruby1.9.1 [ruby-interpreter] 1.9.3.194-1 Versions of packages camping recommends: ii ruby-activerecord-2.3 2.3.14-2 ii ruby-mab 0.0.1+git20120515.30414e4-2 ii ruby-sqlite3 1.3.6-2 ii ruby-tilt 1.3.3-2 Versions of packages camping suggests: ii thin 1.3.1-3 -- no debconf information
>From fe791e787f5665efdc3f17b0f6122260b3a6d770 Mon Sep 17 00:00:00 2001 From: Magnus Holm <judo...@gmail.com> Date: Fri, 10 Feb 2012 17:31:12 +0100 Subject: [PATCH] Server: Also catch 405 from Rack::File --- lib/camping/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/camping/server.rb b/lib/camping/server.rb index 47bffa7..af2bfc8 100644 --- a/lib/camping/server.rb +++ b/lib/camping/server.rb @@ -149,7 +149,7 @@ module Camping end def app - Rack::Cascade.new([Rack::File.new(public_dir), self], [404, 403]) + Rack::Cascade.new([Rack::File.new(public_dir), self], [405, 404, 403]) end def current_app -- 1.7.10.4