lib/spaceship/client.rb in spaceship-0.27.1 vs lib/spaceship/client.rb in spaceship-0.27.2
- old
+ new
@@ -311,11 +311,13 @@
return @service_key if @service_key
# Some customers in Asia have had trouble with the CDNs there that cache and serve this content, leading
# to "buffer error (Zlib::BufError)" from deep in the Ruby HTTP stack. Setting this header requests that
# the content be served only as plain-text, which seems to work around their problem, while not affecting
# other clients.
- headers = {'Accept-Encoding' => 'identity'}
+ #
+ # https://github.com/fastlane/fastlane/issues/4610
+ headers = { 'Accept-Encoding' => 'identity' }
# We need a service key from a JS file to properly auth
js = request(:get, "https://itunesconnect.apple.com/itc/static-resources/controllers/login_cntrl.js", nil, headers)
@service_key ||= js.body.match(/itcServiceKey = '(.*)'/)[1]
end
@@ -427,10 +429,10 @@
# Else, don't.
content = expected_key ? response.body[expected_key] : response.body
end
if content.nil?
- raise UnexpectedResponse.new(response.body)
+ raise UnexpectedResponse, response.body
else
store_csrf_tokens(response)
content
end
end