riak-client 1.4.4 → 1.4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/RELEASE_NOTES.md +14 -0
- data/lib/riak/util/headers.rb +0 -21
- data/lib/riak/version.rb +1 -1
- data/spec/riak/headers_spec.rb +0 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0470172bce5c87b1894c0b14f10f3305944361b
|
4
|
+
data.tar.gz: a27f23fe2344aa79477f037d741621aca64acef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83dd6430cf599ab6d682dff05bc15247ad8912c5d771dc70cd41170fb78e1b9535ccb51c89aa1d03d26f707bd34b1d3a3114e1dc0c6177504135f1f9f90bddac
|
7
|
+
data.tar.gz: 656b3e793a6e54820d0ab851064121d702c126619296a0ac4b911801c106e49d116fc08162390edf6f70b92c3a8aedba3d2b950ed8a085e32707803393b2add0
|
data/RELEASE_NOTES.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Riak Ruby Client Release Notes
|
2
2
|
|
3
|
+
## 1.4.4.1 Bugfix Release - 2014-04-17
|
4
|
+
|
5
|
+
Release 1.4.4.1 includes the intended 1.4.4 bugfix:
|
6
|
+
|
7
|
+
* Remove freedom-patched `Net::HTTPHeader#each_capitalized` method. This
|
8
|
+
caused infinite loops when parsing HTTP headers not related to Riak,
|
9
|
+
and is not necessary in Riak versions newer than 1.1.0. Thanks to
|
10
|
+
Morten Primdahl and Steven Davidovitz at Zendesk for helping isolate and
|
11
|
+
troubleshoot this.
|
12
|
+
|
13
|
+
## 1.4.4 - 2014-04-17
|
14
|
+
|
15
|
+
No changes from 1.4.3.
|
16
|
+
|
3
17
|
## 1.4.3 Bugfix Release - 2013-12-31
|
4
18
|
|
5
19
|
Release 1.4.3 fixes some bugs and improves documentation.
|
data/lib/riak/util/headers.rb
CHANGED
@@ -1,26 +1,5 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
|
3
|
-
# Splits headers into < 8KB chunks
|
4
|
-
# @private
|
5
|
-
module Net::HTTPHeader
|
6
|
-
def each_capitalized
|
7
|
-
# 1.9 check
|
8
|
-
respond_to?(:enum_for) and (block_given? or return enum_for(__method__))
|
9
|
-
@header.each do |k,v|
|
10
|
-
base_length = "#{k}: \r\n".length
|
11
|
-
values = v.map {|i| i.to_s.split(", ") }.flatten
|
12
|
-
while !values.empty?
|
13
|
-
current_line = ""
|
14
|
-
while values.first && current_line.length + base_length + values.first.length + 2 < 8192
|
15
|
-
val = values.shift.strip
|
16
|
-
current_line += current_line.empty? ? val : ", #{val}"
|
17
|
-
end
|
18
|
-
yield capitalize(k), current_line
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
3
|
module Riak
|
25
4
|
module Util
|
26
5
|
# Represents headers from an HTTP request or response.
|
data/lib/riak/version.rb
CHANGED
data/spec/riak/headers_spec.rb
CHANGED
@@ -18,21 +18,4 @@ describe Riak::Util::Headers do
|
|
18
18
|
h.parse("Content-Type: text/plain\r\n")
|
19
19
|
h.to_hash.should == {"content-type" => ["text/plain"]}
|
20
20
|
end
|
21
|
-
|
22
|
-
it "should split headers larger than 8KB" do
|
23
|
-
# This really tests Net::HTTPHeader#each_capitalized, which is
|
24
|
-
# used by Net::HTTP to write the headers to the socket. It does
|
25
|
-
# not cover the case where a single value is larger than 8KB. If
|
26
|
-
# you're doing that, you have something else wrong.
|
27
|
-
h = Riak::Util::Headers.new
|
28
|
-
10.times do
|
29
|
-
h.add_field "Link", "f" * 820
|
30
|
-
end
|
31
|
-
count = 0
|
32
|
-
h.each_capitalized do |k,v|
|
33
|
-
count += 1
|
34
|
-
"#{k}: #{v}\r\n".length.should < 8192
|
35
|
-
end
|
36
|
-
count.should > 1
|
37
|
-
end
|
38
21
|
end
|