| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Camping
Revision: 239
Author: zimbatm
Date: 23 Nov 2007 15:52:56
Diff at Trac: http://code.whytheluckystiff.net/camping/changeset/239
Changes:Fixed EOL issues between HTTP header and body (I hope)
Files:| ... | ...@@ -34,8 +34,8 @@ | |
| 34 | 34 | "application/x-www-form-urlencoded": q.u(C.qsp(@in.read))end |
| 35 | 35 | @cookies,@input=@k.dup,q.dup end;def service *a;@body=send @method,*a |
| 36 | 36 | headers['Set-Cookie']=cookies.map{|k,v|"#{k}=#{C.escape(v)}; path=#{self/ |
| 37 | "/"}"if v!=@k[k]}-[nil];self end;def to_s | |
| 38 | "Status: #@status#{Z+headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z+Z}#@body"end | |
| 37 | "/"}"if v!=@k[k]}-[nil];self end;def to_s;"Status: #@status#{Z+(headers.map{ | |
| 38 | |k,v|[*v].map{|x|[k,v]*": "}}*Z).gsub(Z*2,Z)+Z+Z}#@body"end | |
| 39 | 39 | end;X=module Controllers;@r=[];class<<self;def r;@r end;def R *u;r=@r |
| 40 | 40 | Class.new{meta_def(:urls){u};meta_def(:inherited){|x|r<<x}}end |
| 41 | 41 | def D p,m;r.map{|k|k.urls.map{|x|return(k.instance_method(m)rescue nil)? |
| ... | ...@@ -461,7 +461,7 @@ | |
| 461 | 461 | # Used by the web server to convert the current request to a string. If you need to |
| 462 | 462 | # alter the way Camping builds HTTP headers, consider overriding this method. |
| 463 | 463 | def to_s |
| 464 | "Status: #@status#{Z+headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z+Z}#@body" | |
| 464 | "Status: #@status#{Z+(headers.map{|k,v|[*v].map{|x|[k,v]*": "}}*Z).gsub(Z*2,Z)+Z+Z}#@body" | |
| 465 | 465 | end |
| 466 | 466 | |
| 467 | 467 | end |