Changeset 171

Show
Ignore:
Timestamp:
10/12/2006 21:48:22 (2 years ago)
Author:
why
Message:
  • lib/camping.rb: solving #98, an extra newline in the headers when cookies are empty.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/camping.rb

    r170 r171  
    2424@k.dup,q.dup end;def service*a;@body=send(@method,*a)if respond_to?@method 
    2525@headers["Set-Cookie"]=@cookies.map{|k,v|"#{k}=#{C.escape(v)}; path=#{self/'/' 
    26 }"if v!=@k[k]}-[nil];self end;def to_s;"Status: #{@status}#{Z+@headers.map{|k,v| 
    27 [*v].map{|x|"#{k}: #{x}"}}*Z+Z*2+@body}"end;end 
     26}"if v!=@k[k]}-[nil];self end;def to_s;a=[];@headers.map{|k,v|[*v].map{|x|a<< 
     27"#{k}: #{x}"}};"Status: #{@status}#{Z+a*Z+Z*2+@body}"end;end 
    2828X=module Controllers;@r=[];class<<self;def r;@r;end;def R*u;r=@r;Class.new{ 
    2929meta_def(:urls){u};meta_def(:inherited){|x|r<<x}}end;def M;def M;end;constants.map{|c|