Changeset 224
- Timestamp:
- 09/25/2007 06:39:47 (13 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
r222 r224 415 415 # alter the way Camping builds HTTP headers, consider overriding this method. 416 416 def to_s 417 "Status: # {status}#{Z+headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z+Z*2}#{body}"417 "Status: #@status#{Z+headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z+Z}#@body" 418 418 end 419 419 -
trunk/lib/camping.rb
r222 r224 27 27 dup,q.dup end;def service*a;@body=send(@method,*a)if respond_to?@method 28 28 headers["Set-Cookie"]=cookies.map{|k,v|"#{k}=#{C.escape v}; path=#{self/'/'}"if 29 v!=@k[k]}-[nil];self end;def to_s;"Status: # {status}#{Z+headers.map{|k,v|[*v].30 map{|x|[k,v]*": "}}*Z+Z *2}#{body}"end;end;X=module Controllers;@r=[];class<<29 v!=@k[k]}-[nil];self end;def to_s;"Status: #@status#{Z+headers.map{|k,v|[*v]. 30 map{|x|[k,v]*": "}}*Z+Z}#@body"end;end;X=module Controllers;@r=[];class<< 31 31 self;def r;@r;end;def R*u;r=@r;Class.new{meta_def(:urls){u};meta_def(:inherited 32 32 ){|x|r<<x}}end;def D p;r.map{|k|k.urls.map{|x|return k,$~[1..-1]if p=~/^#{x
