Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7727

Show
Ignore:
Timestamp:
10/03/07 16:39:18 (1 year ago)
Author:
bitsweat
Message:

Move #query_string to AbstractRequest

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/cgi_process.rb

    r7722 r7727  
    5656      if !qs.blank? 
    5757        qs 
    58       elsif uri = @env['REQUEST_URI'] 
    59         uri.split('?', 2)[1] || '' 
    60       else 
    61         @env['QUERY_STRING'] || '' 
     58      else 
     59        super 
    6260      end 
    6361    end 
  • trunk/actionpack/lib/action_controller/request.rb

    r7719 r7727  
    204204      parts = host.split('.') 
    205205      parts[0..-(tld_length+2)] 
     206    end 
     207 
     208    # Return the query string, accounting for server idiosyncracies. 
     209    def query_string 
     210      if uri = @env['REQUEST_URI'] 
     211        uri.split('?', 2)[1] || '' 
     212      else 
     213        @env['QUERY_STRING'] || '' 
     214      end 
    206215    end 
    207216