akamai-edgegrid 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/akamai/edgegrid.rb +6 -3
- metadata +2 -2
data/lib/akamai/edgegrid.rb
CHANGED
@@ -101,11 +101,14 @@ module Akamai #:nodoc:
|
|
101
101
|
# Returns a hash of the HTTP POST body
|
102
102
|
def make_content_hash(request)
|
103
103
|
if request.method == 'POST' and request.body_exist? and request.body.length > 0
|
104
|
-
|
105
|
-
|
104
|
+
body = request.body
|
105
|
+
if body.length > @max_body
|
106
|
+
@log.debug("data length #{body.length} is larger than maximum #{@max_body}")
|
107
|
+
body = body[0..@max_body-1]
|
108
|
+
@log.debug("data truncated to #{body.length} for computing the hash")
|
106
109
|
end
|
107
110
|
|
108
|
-
return self.class.base64_sha256(
|
111
|
+
return self.class.base64_sha256(body)
|
109
112
|
end
|
110
113
|
return ""
|
111
114
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akamai-edgegrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simplecov
|