diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4dedeae..fe26bee 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.5.0" + ".": "2.5.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 647b86a..44739ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.5.1 (2026-02-03) + +Full Changelog: [v2.5.0...v2.5.1](https://github.com/moderation-api/sdk-ruby/compare/v2.5.0...v2.5.1) + +### Bug Fixes + +* **client:** always add content-length to post body, even when empty ([22201f0](https://github.com/moderation-api/sdk-ruby/commit/22201f0900c1c285c0900dec155b5e0718ccc035)) + ## 2.5.0 (2026-01-28) Full Changelog: [v2.4.0...v2.5.0](https://github.com/moderation-api/sdk-ruby/compare/v2.4.0...v2.5.0) diff --git a/Gemfile.lock b/Gemfile.lock index 1f160e6..cbe877c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - moderation_api (2.5.0) + moderation_api (2.5.1) cgi connection_pool diff --git a/README.md b/README.md index 49ea1a0..20dc2ef 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "moderation_api", "~> 2.5.0" +gem "moderation_api", "~> 2.5.1" ``` diff --git a/lib/moderation_api/internal/transport/pooled_net_requester.rb b/lib/moderation_api/internal/transport/pooled_net_requester.rb index d67d6f4..fddc58f 100644 --- a/lib/moderation_api/internal/transport/pooled_net_requester.rb +++ b/lib/moderation_api/internal/transport/pooled_net_requester.rb @@ -75,7 +75,7 @@ def build_request(request, &blk) case body in nil - nil + req["content-length"] ||= 0 unless req["transfer-encoding"] in String req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"] req.body_stream = ModerationAPI::Internal::Util::ReadIOAdapter.new(body, &blk) diff --git a/lib/moderation_api/version.rb b/lib/moderation_api/version.rb index faa0b01..ef6ebaa 100644 --- a/lib/moderation_api/version.rb +++ b/lib/moderation_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ModerationAPI - VERSION = "2.5.0" + VERSION = "2.5.1" end