Changeset 209
- Timestamp:
- 09/23/2007 16:44:10 (14 months ago)
- Location:
- trunk/lib
- Files:
-
- 2 modified
-
camping-unabridged.rb (modified) (1 diff)
-
camping.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/camping-unabridged.rb
r204 r209 446 446 # alter the way Camping builds HTTP headers, consider overriding this method. 447 447 def to_s 448 a=[] 449 @headers.map{|k,v|[*v].map{|x|a<<"#{k}: #{x}"}} 450 "Status: #{@status}#{Z+a*Z+Z*2+@body}" 448 "Status: #{@status}#{Z+@headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z+Z*2}#{@body}" 451 449 end 452 450 -
trunk/lib/camping.rb
r204 r209 27 27 @body=send(@method,*a)if respond_to?@method;@headers["Set-Cookie"]=@cookies.map{ 28 28 |k,v|"#{k}=#{C.escape(v)}; path=#{self/'/'}"if v!=@k[k]}-[nil];self end;def to_s 29 a=[];@headers.map{|k,v|[*v].map{|x|a<<"#{k}: #{x}"}};"Status: #{@status}#{Z+a*Z+ 30 Z*2+@body}"end;end;X=module Controllers;@r=[];class<<self;def r;@r;end;def R*u29 "Status: #{@status}#{Z+@headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z+Z*2}#{@body}" 30 end;end;X=module Controllers;@r=[];class<<self;def r;@r;end;def R*u 31 31 r=@r;Class.new{meta_def(:urls){u};meta_def(:inherited){|x|r<<x}}end;def M;def M 32 32 end;constants.map{|c|k=const_get(c);k.send:include,C,Base,Models;r[0,0]=k if
