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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 758acadd75c92e8f90ec5048473e2f5790d708bb
4
- data.tar.gz: b63d83423a36353e614eca9e0ac25716b498f327
3
+ metadata.gz: 76e4acbd92955208e5de2dc2dca507706680e2ea
4
+ data.tar.gz: 111c2506ca03dd76ac3845a4bfe6d5ce04b05dec
5
5
  SHA512:
6
- metadata.gz: aced1491d337a12c47163792ec3f0f2bc413f2fd358536fe405c39d33afe22a0417a9388160384ae091006b7b77a2c498d2db3801f8062c5885f12cffb34f0f7
7
- data.tar.gz: 2833c3916bc3538c4a8d6cf49bc8d17b1711b407489e2bc7fe1204026a3b3f5ddca5155a15fb2e377eb6c1b54582d99b2efbd02fc2f34186524e14991e03165f
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
 
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.19.0"
2
+ VERSION = "0.19.1"
3
3
  end
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.0
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-28 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake