这转化为什么? Ruby on Rails asset_host(http%3a%2f%2fohloh.net)

时间:2014-07-18 01:53:08

标签: ruby-on-rails ruby

我正在尝试修复有关http协议的错误。虽然我在底层遇到了这行代码:

def gravatar_url(md5, size)
  default_url = if ActionController::Base.asset_host.blank?
                  "http%3a%2f%2fohloh.net"
                else
                  "http#{"s" if request.ssl?}%3a%2f%2f#{ ActionController::Base.asset_host  }"
                end

   default_url << "%2fanon#{default_size(size).to_s}.gif"

   gravatar_host = request.ssl? ? "https://gravatar.com" : "http://gravatar.com"

   "#{gravatar_host}/avatar/#{md5}?&s=#{size}&rating=PG&d=#{default_url}"
end

特别是,这是什么意思? &#34; HTTP%3A%2F%2fohloh.net&#34 ;.我以前从未见过这个。帮助将不胜感激。谢谢。

1 个答案:

答案 0 :(得分:0)

这只意味着http://ohloh.net%xx条目为URL-encoded