vendor/bundle/ruby/2.7.0/gems/octokit-4.20.0/lib/octokit/middleware/follow_redirects.rb
# HTTP methods for which 30x redirects can be followed
HTTP methods for which 30x redirects can be followed
HTTP methods for which 30x redirects can be followed
def update_env(env, request_body, response)
        original_url = env[:url]
        env[:url] += safe_escape(response["location"])
        unless same_host?(original_url, env[:url])
          env[:request_headers].delete("Authorization")
        end
        if convert_to_get?(response)
          env[:method] = :get
          env[:body] = nil
        else
          env[:body] = request_body
        end
        ENV_TO_CLEAR.each { |key| env.delete(key) }
        env
      end
def update_env ( env , request_body , response ) original_url = env [ :url ] env [ :url ] += safe_escape ( response [ "location" ] ) unless same_host? ( original_url , env [ :url ] ) env [ :request_headers ] . delete ( "Authorization" ) end if convert_to_get? ( response ) env [ :method ] = :get env [ :body ] = nil else env [ :body ] = request_body end ENV_TO_CLEAR . each { | key | env . delete ( key ) } env end
HTTP methods for which 30x redirects can be followed
HTTP methods for which 30x redirects can be followed
env
<not_specific>
request_body
<not_specific>
response
<not_specific>