From da08f69cebb635a674a0c644db3c351148150b72 Mon Sep 17 00:00:00 2001 From: Vlad Gramuzov Date: Thu, 2 May 2019 13:33:01 +0300 Subject: [PATCH] fix(http-stream): Use Content-Type header key as a string --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- lib/active_record_streams/publishers/http_stream.rb | 2 +- lib/active_record_streams/version.rb | 2 +- lib/active_record_streams/version_spec.rb | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3782d3b..c67dbbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,3 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.1.2] - 2019-05-02 ### Added - HTTPS targets support + +## [0.1.3] - 2019-05-02 +### Changed +- `Content-type` header for the HTTP streams is set as a string to fix doubled content-type issue diff --git a/Gemfile.lock b/Gemfile.lock index c7c11e8..b36215b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - active_record_streams (0.1.2) + active_record_streams (0.1.3) activerecord (~> 4.2.10) aws-sdk (~> 2.11.9) diff --git a/lib/active_record_streams/publishers/http_stream.rb b/lib/active_record_streams/publishers/http_stream.rb index 49dead4..6a5426d 100644 --- a/lib/active_record_streams/publishers/http_stream.rb +++ b/lib/active_record_streams/publishers/http_stream.rb @@ -74,7 +74,7 @@ def uri end def headers - { 'Content-Type': DEFAULT_CONTENT_TYPE }.merge(@headers) + { 'Content-Type' => DEFAULT_CONTENT_TYPE }.merge(@headers) end def assert_response_code(response) diff --git a/lib/active_record_streams/version.rb b/lib/active_record_streams/version.rb index cc792c4..cea9c0e 100644 --- a/lib/active_record_streams/version.rb +++ b/lib/active_record_streams/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ActiveRecordStreams - VERSION = '0.1.2' + VERSION = '0.1.3' end diff --git a/lib/active_record_streams/version_spec.rb b/lib/active_record_streams/version_spec.rb index 5dd7c29..3bd2f33 100644 --- a/lib/active_record_streams/version_spec.rb +++ b/lib/active_record_streams/version_spec.rb @@ -4,6 +4,6 @@ RSpec.describe ActiveRecordStreams::VERSION do it 'has a version number' do - expect(subject).to eq('0.1.2') + expect(subject).to eq('0.1.3') end end