diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-07-01 13:32:33 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-07-01 13:35:27 -0700 |
commit | ec14a20474575e77a23b713ee8fcda1e71b1d018 (patch) | |
tree | 596f6dd814beffd9a7ee04ffa2000c6b6471370d /lib/unicorn/app/inetd.rb | |
parent | 563d03f649ef31d2aec3505cbbed1e015493b8fc (diff) | |
download | unicorn-ec14a20474575e77a23b713ee8fcda1e71b1d018.tar.gz |
This gives the app ability to deny clients with 417 instead of blindly making the decision for the underlying application. Of course, apps must be made aware of this.
Diffstat (limited to 'lib/unicorn/app/inetd.rb')
-rw-r--r-- | lib/unicorn/app/inetd.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/unicorn/app/inetd.rb b/lib/unicorn/app/inetd.rb index 43a23eb..c3b8bbc 100644 --- a/lib/unicorn/app/inetd.rb +++ b/lib/unicorn/app/inetd.rb @@ -97,6 +97,10 @@ module Unicorn::App end def call(env) + expect = env[Unicorn::Const::HTTP_EXPECT] and + /\A100-continue\z/i =~ expect and + return [ 100, {} , [] ] + [ 200, { 'Content-Type' => 'application/octet-stream' }, CatBody.new(env, @cmd) ] end |