GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: the 4k pocket full-of-gags web microframework
Homepage: http://code.whytheluckystiff.net/camping/
Clone URL: git://github.com/why/camping.git
 * lib/camping.rb: regexp wasn't allowing hash syntax (?post[author]=why) 
 in the query string for key names longer than one character.
why (author)
Sat May 24 20:25:19 -0700 2008
commit  653585ce1695c4dff489a66daa07f90d399897c3
tree    a804ddc33b17b435b9996e5a2313aa46203babf9
parent  d56614c6fba50a774048e6cb36e136b755321ce7
...
612
613
614
615
 
616
617
618
...
612
613
614
 
615
616
617
618
0
@@ -612,7 +612,7 @@ module CampSh::Views
0
 
0
             h2. Using with Firefox
0
 
0
- For best effect, go to @about:config@ and set @keyword.URL@ to @http://#{env['HTTP_HOST']}#{self./ "/run/"}@. Restart Firefox,
0
+ For best effect, go to @about:config@ and set @keyword.URL@ to @http://#{env.HTTP_HOST}#{self./ "/run/"}@. Restart Firefox,
0
             you will then be able to run commands directly from the address bar.
0
 
0
             For example:
...
416
417
418
419
420
 
 
421
422
423
...
416
417
418
 
 
419
420
421
422
423
0
@@ -416,8 +416,8 @@ module Camping
0
       @input.each do |k, v|
0
         if k[-2..-1] == "[]"
0
           @input[k[0..-3]] = @input.delete(k)
0
- elsif k =~ /(.*)\[([^\]])\]$/
0
- (@input[$1] ||= {})[$2] = @input.delete(k)
0
+ elsif k =~ /(.*)\[([^\]]+)\]$/
0
+ (@input[$1] ||= H[])[$2] = @input.delete(k)
0
         end
0
       end
0
     end
...
25
26
27
28
 
29
30
31
...
25
26
27
 
28
29
30
31
0
@@ -25,7 +25,7 @@ r 501,P%"#{m.upcase} not implemented"end;def to_a
0
 @request.script_name.sub(/\/$/,''),H[@request.params],
0
 H[@request.cookies],@response.headers,@response.body,
0
 @response.status;@input.each{|k,v|if k[-2..-1]=="[]";@input[k[0..-3]]=
0
-@input.delete(k)elsif k=~/(.*)\[([^\]])\]$/;(@input[$1]||={})[$2]=
0
+@input.delete(k)elsif k=~/(.*)\[([^\]]+)\]$/;(@input[$1]||=H[])[$2]=
0
 @input.delete(k)end};end;def service *a;o=@cookies.dup;@response.body=
0
 (send(@request.request_method.downcase,*a)||@body);@response.status=@status;
0
 @response.headers.merge!(@headers);@cookies.each{|k,v|@response.

Comments

    No one has commented yet.