Skip to content

Commit

Permalink
* lib/camping.rb: solving #98, an extra newline in the headers when …
Browse files Browse the repository at this point in the history
…cookies are empty.
  • Loading branch information
_why committed Oct 13, 2006
1 parent 6558661 commit b9c0d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/camping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def initialize r,e,m;e=H[e.to_hash];@status,@method,@env,@headers,@root=200,m.
fh.is_a?H;end;elsif@method=="post";q.u C.qsp(@in.read)end;@cookies,@input=
@k.dup,q.dup end;def service*a;@body=send(@method,*a)if respond_to?@method
@headers["Set-Cookie"][email protected]{|k,v|"#{k}=#{C.escape(v)}; path=#{self/'/'
}"if v!=@k[k]}-[nil];self end;def to_s;"Status: #{@status}#{Z+@headers.map{|k,v|
[*v].map{|x|"#{k}: #{x}"}}*Z+Z*2+@body}"end;end
}"if v!=@k[k]}-[nil];self end;def to_s;a=[];@headers.map{|k,v|[*v].map{|x|a<<
"#{k}: #{x}"}};"Status: #{@status}#{Z+a*Z+Z*2+@body}"end;end
X=module Controllers;@r=[];class<<self;def r;@r;end;def R*u;r=@r;Class.new{
meta_def(:urls){u};meta_def(:inherited){|x|r<<x}}end;def M;def M;end;constants.map{|c|
k=const_get(c);k.send:include,C,Base,Models;r[0,0]=k if !r.include?k;k.meta_def(
Expand Down

0 comments on commit b9c0d05

Please sign in to comment.