From 70d1c0d55a6982b059be2809cae088351ba7f112 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 06:01:55 +0000 Subject: [PATCH 1/2] fix(client): loosen json header parsing --- lib/courier/internal/util.rb | 2 +- rbi/courier/internal/util.rbi | 2 +- test/courier/internal/util_test.rb | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/courier/internal/util.rb b/lib/courier/internal/util.rb index fc0a2c77..e49292ae 100644 --- a/lib/courier/internal/util.rb +++ b/lib/courier/internal/util.rb @@ -485,7 +485,7 @@ def writable_enum(&blk) end # @type [Regexp] - JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)} + JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)} # @type [Regexp] JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)} diff --git a/rbi/courier/internal/util.rbi b/rbi/courier/internal/util.rbi index 97cb71f7..5d0a35f9 100644 --- a/rbi/courier/internal/util.rbi +++ b/rbi/courier/internal/util.rbi @@ -296,7 +296,7 @@ module Courier end JSON_CONTENT = - T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp) + T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp) JSONL_CONTENT = T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp) diff --git a/test/courier/internal/util_test.rb b/test/courier/internal/util_test.rb index 5584ef84..c4dd2b16 100644 --- a/test/courier/internal/util_test.rb +++ b/test/courier/internal/util_test.rb @@ -171,6 +171,8 @@ def test_json_content cases = { "application/json" => true, "application/jsonl" => false, + "application/arbitrary+json" => true, + "application/ARBITRARY+json" => true, "application/vnd.github.v3+json" => true, "application/vnd.api+json" => true } From 85d02e673be03f039550d7fe8813dd54437dbf3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 06:02:14 +0000 Subject: [PATCH 2/2] release: 4.7.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/courier/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1eec10e9..f1a48d37 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.7.0" + ".": "4.7.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 373589be..f93bae61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.7.1 (2026-02-07) + +Full Changelog: [v4.7.0...v4.7.1](https://github.com/trycourier/courier-ruby/compare/v4.7.0...v4.7.1) + +### Bug Fixes + +* **client:** loosen json header parsing ([70d1c0d](https://github.com/trycourier/courier-ruby/commit/70d1c0d55a6982b059be2809cae088351ba7f112)) + ## 4.7.0 (2026-02-06) Full Changelog: [v4.6.3...v4.7.0](https://github.com/trycourier/courier-ruby/compare/v4.6.3...v4.7.0) diff --git a/Gemfile.lock b/Gemfile.lock index c0b0364f..e0b6500b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - trycourier (4.7.0) + trycourier (4.7.1) cgi connection_pool diff --git a/README.md b/README.md index 9c8eb441..3e2c2646 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "trycourier", "~> 4.7.0" +gem "trycourier", "~> 4.7.1" ``` diff --git a/lib/courier/version.rb b/lib/courier/version.rb index 006c4e58..4ef2cb5e 100644 --- a/lib/courier/version.rb +++ b/lib/courier/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Courier - VERSION = "4.7.0" + VERSION = "4.7.1" end