Ticket #123: fix_double_broken_pipe.diff

File fix_double_broken_pipe.diff, 2.0 kB (added by brmichel, 20 months ago)
  • lib/camping/fastcgi.rb

    diff -Nru camping-orig/lib/camping/fastcgi.rb camping-1.5svn5/lib/camping/fastcgi.rb
    old new  
    176176        else 
    177177            req.out << body.to_s 
    178178        end 
     179    rescue Errno::EPIPE, EOFError 
     180    rescue SystemExit 
     181        raise 
    179182    rescue Exception => e 
    180183        req.out << server_error(root, path, exc, req) 
    181184    ensure 
  • lib/camping-unabridged.rb

    diff -Nru camping-orig/lib/camping-unabridged.rb camping-1.5svn5/lib/camping-unabridged.rb
    old new  
    663663      X.M 
    664664      k,a=X.D un("/#{e['PATH_INFO']}".gsub(/\/+/,'/')) 
    665665      k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).Y.service *a 
     666    rescue SystemExit 
     667      raise 
    666668    rescue Object=>x 
    667669      X::ServerError.new(r,e,'get').service(k,m,x) 
    668670    end 
  • lib/camping.rb

    diff -Nru camping-orig/lib/camping.rb camping-1.5svn5/lib/camping.rb
    old new  
    4141n,&m)rescue([*o]<<n)};q.to_s.split(/[#{d}] */n).inject((b,z=z,H[])[0]){|h,p|k,v=un(p). 
    4242split('=',2);h.u k.split(/[\]\[]+/).reverse.inject(y||v){|x,i|H[i,x]},&m}end;def 
    4343kp s;c=qsp(s,';,')end;def run r=$stdin,e=ENV;X.M;k,a=X.D un("/#{e[ 
    44 'PATH_INFO']}".gsub(/\/+/,'/'));k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).Y. 
    45 service *a;rescue Object=>x;X::ServerError.new(r,e,'get').service(k,m,x)end 
     44'PATH_INFO']}".gsub(/\/+/,'/'));k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).Y.service *a; 
     45rescue SystemExit;raise;rescue Object=>x;X::ServerError.new(r,e,'get').service(k,m,x)end 
    4646def method_missing m,c,*a;X.M;k=X.const_get(c).new(StringIO.new,H['HTTP_HOST', 
    4747'','SCRIPT_NAME','','HTTP_COOKIE',''],m.to_s);H.new(a.pop).each{|e,f|k.send( 
    4848"#{e}=",f)}if Hash===a[-1];k.service *a;end;end;module Views;include X,Helpers