protocol-http 0.50.0 → 0.50.1

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: a149fe05f4aa029e53311afcde231a52bc3edb37ef6b7b1a8692ad810a8d09cf
4
- data.tar.gz: d08125fb593047347be471daa72ee56b76bde776f23f6b23ce0e6e9d05da0339
3
+ metadata.gz: 38991af57b4ea197e5eebf1650490f4d52d52f6bc8e17d3a101d97b0a9fd5bda
4
+ data.tar.gz: d00e1f54aa78732dbd390cb3b6b59fe4dee4604acfc9fdbb2c7ec93aea56327d
5
5
  SHA512:
6
- metadata.gz: 12e43aeb55bafe83688f7e1385e0c948b419348f0da31baf44a772473ffffb4be57d66b13e511fcfcd906a0855f7fa5ba7ecf378da893b155a795e66ac5d19c0
7
- data.tar.gz: c7a5118e4ca3b9a471f9850ec0497126e73638b2963b3379e252c0b69c8ea08f5bbccd5a91ab354a38d17d12eb3333d3698611abab354b2fc0f708e2f35186d1
6
+ metadata.gz: 4a6d9ce75c94602ee50ae9666a9e20ce55385681651ae09d50b0b7485b67d682e91916939595ec78d2920d1bd51713225937f03879d7cdac3ebfeed47df6d140
7
+ data.tar.gz: c921f21ca8c833280e9eb70d6ef7c6ffe3b61b9e772205e06b5e8ecb3bf60722cda228887924826a4b045fc6a54bbf7bf1c27d96066fe8316eba4f4c01eb59d5
checksums.yaml.gz.sig CHANGED
Binary file
@@ -46,14 +46,16 @@ module Protocol
46
46
  # https://lists.w3.org/Archives/Public/ietf-http-wg/2014JanMar/1179.html
47
47
  return response if response.partial?
48
48
 
49
+ body = response.body
50
+
51
+ # If there is no response body, there is nothing to encode:
52
+ return response if body.nil? or body.empty?
53
+
49
54
  # Ensure that caches are aware we are varying the response based on the accept-encoding request header:
50
55
  response.headers.add("vary", "accept-encoding")
51
56
 
52
- # TODO use http-accept and sort by priority
53
- if !response.body.empty? and accept_encoding = request.headers["accept-encoding"]
57
+ if accept_encoding = request.headers["accept-encoding"]
54
58
  if content_type = response.headers["content-type"] and @content_types =~ content_type
55
- body = response.body
56
-
57
59
  accept_encoding.each do |name|
58
60
  if wrapper = @wrappers[name]
59
61
  response.headers["content-encoding"] = name
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP
8
- VERSION = "0.50.0"
8
+ VERSION = "0.50.1"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
@@ -1 +1,5 @@
1
- �ޜ���oc�s�Vpg���a�'�iɱ�D7.z��O6y��l9������$6a S"$j?(#a@�x�Jf��� �Y/��x+Fx3����
1
+ �|���qd���ۧ&��c��ɐ"�\^�\0'
2
+ ��}��Hb%��K1w�IP��Y������>�a��y��vd=�ٛ�N)�m>�����&im[.~ ���,�!���h��g�,Y��'U��D��/� ]�-��D����F��>im�3�FeIV�b�=� o�׼���S��NAb���{�d�u&7V{9U�O���O��h�r <)�K�����M��k%�t�H�w���qg(G�yv
3
+ ���_P��A'��W��.g*�j�V�T�沚���|�m&�Q�aw㎻d�
4
+ �m+1���l�2�,=������=c�"�H�=\�I6���m�֩| ��nCu�[:�Wi���-��n�@��
5
+ )C2��;��
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.50.0
4
+ version: 0.50.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -47,7 +47,7 @@ cert_chain:
47
47
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
48
48
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
49
49
  -----END CERTIFICATE-----
50
- date: 2025-04-28 00:00:00.000000000 Z
50
+ date: 2025-04-29 00:00:00.000000000 Z
51
51
  dependencies: []
52
52
  executables: []
53
53
  extensions: []
metadata.gz.sig CHANGED
Binary file