fix: Prevent upload requests from form-encoding their queries

This commit is contained in:
Daniel Azuma 2019-11-05 08:28:54 -08:00 committed by GitHub
parent 6dba874ed0
commit 85763ece2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,10 @@ module Google
@state = :start @state = :start
@upload_url = nil @upload_url = nil
@offset = 0 @offset = 0
# Prevent the command from populating the body with form encoding, by
# asserting that it already has a body. Form encoding is never used
# by upload requests.
self.body = '' unless self.body
super super
end end