public Method

HTTPUtils.parse_query(str)

There's no documentation for this item.

Source Code

# File webrick/httputils.rb, line 293
def parse_query(str)
  query = Hash.new
  if str
    str.split(/[&;]/).each{|x|
      next if x.empty? 
      key, val = x.split(/=/,2)
      key = unescape_form(key)
      val = unescape_form(val.to_s)
      val = FormData.new(val)
      val.name = key
      if query.has_key?(key)
        query[key].append_data(val)
        next
      end
      query[key] = val
    }
  end
  query
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.