logjam_agent 0.19.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logjam_agent/middleware.rb +10 -0
- data/lib/logjam_agent/rack/logger.rb +1 -1
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76e4acbd92955208e5de2dc2dca507706680e2ea
|
4
|
+
data.tar.gz: 111c2506ca03dd76ac3845a4bfe6d5ce04b05dec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f168cb6d857520094b22413139410596bbe55eb15288059f77c99765fbc2a82a10a1b3f09976d86f3900449113dabb8b23f9aa4f523fde8efd1ea5fc5c2121db
|
7
|
+
data.tar.gz: e64fa86a63bfa0a13bdc114447d373e3f0874d9bd1268b217958f707fd4011869eb455285b73dc4889ca032d384954b036262a818c892aacddedc68853ac7266
|
@@ -6,6 +6,7 @@ module LogjamAgent
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def call(env)
|
9
|
+
strip_encoding_from_etag(env)
|
9
10
|
request = start_request(env)
|
10
11
|
result = @app.call(env)
|
11
12
|
result[1] ||= {}
|
@@ -26,6 +27,15 @@ module LogjamAgent
|
|
26
27
|
|
27
28
|
private
|
28
29
|
|
30
|
+
def strip_encoding_from_etag(env)
|
31
|
+
# In some versions, Apache is appending the content encoding,
|
32
|
+
# like gzip to the ETag-Response-Header, which will cause the
|
33
|
+
# Rack::ConditionalGet middleware to never match.
|
34
|
+
if env["HTTP_IF_NONE_MATCH"] =~ /\A(.*)-\w+(\")\z/
|
35
|
+
env["HTTP_IF_NONE_MATCH"] = $1 + $2
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
29
39
|
def start_request(env)
|
30
40
|
app_name = env["logjam_agent.application_name"] || LogjamAgent.application_name
|
31
41
|
env_name = env["logjam_agent.environment_name"] || LogjamAgent.environment_name
|
@@ -77,7 +77,7 @@ module LogjamAgent
|
|
77
77
|
|
78
78
|
logjam_request.start_time = start_time
|
79
79
|
logjam_fields = logjam_request.fields
|
80
|
-
ip = LogjamAgent.ip_obfuscator(env["action_dispatch.remote_ip"])
|
80
|
+
ip = LogjamAgent.ip_obfuscator(env["action_dispatch.remote_ip"].to_s)
|
81
81
|
logjam_fields.merge!(:ip => ip, :host => @hostname)
|
82
82
|
logjam_fields.merge!(extract_request_info(request))
|
83
83
|
|
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|