fix: Remove duplicate clauses in X-Goog-Api-Client header
This commit is contained in:
1 parent
7d61018813
commit
ddd4ecea51
2 files changed
+11
No files matched your search
@@ -131,6 +131,9 @@ module Google
|
||||
.find_all { |k, v| k.downcase == 'x-goog-api-client' }
|
||||
.map { |(a, b)| b }
|
||||
.join(' ')
|
||||
.split
|
||||
.find_all { |s| s !~ %r{^gl-ruby/|^gdcl/} }
|
||||
.join(' ')
|
||||
xgac = "gl-ruby/#{RUBY_VERSION} gdcl/#{Google::Apis::VERSION}"
|
||||
xgac = old_xgac.empty? ? xgac : "#{old_xgac} #{xgac}"
|
||||
header.delete_if { |k, v| k.downcase == 'x-goog-api-client' }
|
||||
|
||||
Reference in new issue
Block a user