lamby 2.5.2 → 2.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0051a75ff0e51b92b660dcab7697dcc015824f01a5e5bbbdca960f749da197c
4
- data.tar.gz: 45da42505df9c282cffc4097739c3b7278b9d95057675860e1044d73036d7b2b
3
+ metadata.gz: 1e7a5dca080f6ad01223f4fb9de1284240d8c3512b0a7790d97bcd4461103ca8
4
+ data.tar.gz: 2341bada28a7832cd0035ab03bfbe18b69451864d8e1917c93a64710513708ec
5
5
  SHA512:
6
- metadata.gz: af98da487e7fd90fa68f547cb92040e21bae77c3049e4f83e93b436e0455312bfef1ea1cd976b74ad76e74f16d3e5c3b0cb47c8ed6d41ffd52ce072303cc9bb0
7
- data.tar.gz: 6531ffcc4f0bb7268b3e1c4c7be5c0a6a2e54966def1570f40bd7fb53336c0c22b21f17b77f3caab8b436b0abbb460654d49076760614ab98f77270fa828d51f
6
+ metadata.gz: 8d9396e54730b3bf3c414d141845a71897b92ffa26a336fd7ca68cc0a8c4c1f6b56e22aadbb008d8838670dbb34878ad7a73087aa528c5edca0947e484774e72
7
+ data.tar.gz: 19bf131edee90db7a82b3d6b98cb302639c3cb8d150f595e5c2e2e3258b8bd4ae96b2a2855dccfb8c188634576e10a4bbfae0fffe7e3c2bcae12c12684ded2b9
@@ -3,6 +3,12 @@
3
3
 
4
4
  See this http://keepachangelog.com link for information on how we want this documented formatted.
5
5
 
6
+ ## v2.5.3
7
+
8
+ #### Fixed
9
+
10
+ * Base64 encode response body if the rack response is gzip or brotli compressed.
11
+
6
12
  ## v2.5.2
7
13
 
8
14
  * SSM file always overwrites. Fixes #65.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lamby (2.5.2)
4
+ lamby (2.5.3)
5
5
  rack
6
6
 
7
7
  GEM
@@ -166,4 +166,4 @@ DEPENDENCIES
166
166
  rake
167
167
 
168
168
  BUNDLED WITH
169
- 2.1.4
169
+ 2.2.7
@@ -47,6 +47,7 @@ module Lamby
47
47
  def base64_encodeable?
48
48
  @headers && (
49
49
  @headers['Content-Transfer-Encoding'] == 'binary' ||
50
+ content_encoding_compressed? ||
50
51
  @headers['X-Lamby-Base64'] == '1'
51
52
  )
52
53
  end
@@ -80,5 +81,9 @@ module Lamby
80
81
  end
81
82
  end
82
83
 
84
+ def content_encoding_compressed?
85
+ content_encoding_header = @headers['Content-Encoding'] || ''
86
+ content_encoding_header.split(', ').any? { |h| ['br', 'gzip'].include?(h) }
87
+ end
83
88
  end
84
89
  end
@@ -1,3 +1,3 @@
1
1
  module Lamby
2
- VERSION = '2.5.2'
2
+ VERSION = '2.5.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lamby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2021-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack