google-apis-core 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e473e85fbf99d63f40efe7a2ad6a62aa63e2243098d0ca89de9913b0158f16ed
4
- data.tar.gz: ac5ef1511631d8fe647c25891cf25ef8fd6c57fddcfdf6be86def2dd79eab50a
3
+ metadata.gz: 496e7d887e5cfdbe739f62370d447dc9d663352a6385ab89e7bc7aa75f58d391
4
+ data.tar.gz: d68a12cee717e901edd3f1092dbe338f1692c0ccaba75408096ed5a05256eecf
5
5
  SHA512:
6
- metadata.gz: 9043b70319aa23ec2bb0d902595124e47b81fa3d1bb523edc98533642e23a2835038e6fa2f6fe267f08eb721c2c26c37465aa5c97fb7d02b6878cb9a5702ef48
7
- data.tar.gz: ea1b48cdcbb50d39686a19499bca54ef7dd8f60a8241917d8299858376d3d31441a0f6b2aa41cc0b8bfcec007a33a53f9fb6ec0dfdc53d1d784c2decc0dd9f7c
6
+ metadata.gz: 01423b834b7449a7824b35a64bda7e31df896e0a40a5084217ff52186d467cbea8d3d2359475ebd5d0b7d3bc0585fbfaef1682965b72195262ef591c2ef8a5e9
7
+ data.tar.gz: 53f83a8ed0557d57939c017bd5910e98d38e0211a25053f79ecf5ddfd528000d5382f8347769529f182263f4d2089ec371d1c575481e0070cef94051c29673c9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.2.5 (2026-07-20)
4
+
5
+ #### Bug Fixes
6
+
7
+ * ignore non-2xx status codes in streaming downloads ([#27256](https://github.com/googleapis/google-api-ruby-client/issues/27256))
8
+
3
9
  ### 1.2.4 (2026-06-28)
4
10
 
5
11
  #### Bug Fixes
@@ -81,11 +81,12 @@ module Google
81
81
 
82
82
  http_res = client.get(url.to_s, query, request_header) do |request|
83
83
  request.options.on_data = proc do |chunk, _size, res|
84
- # The on_data callback is only invoked on a successful response.
85
84
  # Some Faraday adapters (e.g. Typhoeus) may not provide a response
86
85
  # object in the callback, so we default to a 200 OK status.
86
+ # Note: Ignore non-2xx responses (redirects and 4xx/5xx error payloads)
87
+ # so error messages are not written to the download stream.
87
88
  status = res ? res.status.to_i : 200
88
- next if chunk.nil? || (status >= 300 && status < 400)
89
+ next if chunk.nil? || !(200..299).include?(status)
89
90
 
90
91
  # HTTP 206 is Partial Content
91
92
  download_offset ||= (status == 206 ? @offset : 0)
@@ -48,11 +48,12 @@ module Google
48
48
 
49
49
  http_res = client.get(url.to_s, query, request_header) do |request|
50
50
  request.options.on_data = proc do |chunk, _size, res|
51
- # The on_data callback is only invoked on a successful response.
52
51
  # Some Faraday adapters (e.g. Typhoeus) may not provide a response
53
52
  # object in the callback, so we default to a 200 OK status.
53
+ # Note: Ignore non-2xx responses (redirects and 4xx/5xx error payloads)
54
+ # so error messages are not written to the download stream.
54
55
  status = res ? res.status.to_i : 200
55
- next if chunk.nil? || (status >= 300 && status < 400)
56
+ next if chunk.nil? || !(200..299).include?(status)
56
57
 
57
58
  download_offset ||= (status == 206 ? @offset : 0)
58
59
  download_offset += chunk.bytesize
@@ -16,7 +16,7 @@ module Google
16
16
  module Apis
17
17
  module Core
18
18
  # Core version
19
- VERSION = "1.2.4".freeze
19
+ VERSION = "1.2.5".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -167,7 +167,7 @@ licenses:
167
167
  metadata:
168
168
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
169
169
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core/CHANGELOG.md
170
- documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.2.4
170
+ documentation_uri: https://googleapis.dev/ruby/google-apis-core/v1.2.5
171
171
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core
172
172
  rdoc_options: []
173
173
  require_paths: