appmap 0.72.1 → 0.72.2

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: d0dac1cd2861b93a4ec1865d66c561b11bb325263e4f2918192a455158c62429
4
- data.tar.gz: 6565fc39df7835aa009fdba68890bb8879f771092b32c2c53f8140d3c2d69196
3
+ metadata.gz: 87322a2d5ba58dfc1fb69259af06c59077d3897f1e37e91e5a94dd2cbba1478b
4
+ data.tar.gz: ace21bbbd53fa487b27339e2af8fb16f4f8ec7b3ca7bbe218ba205b8ff7fc94b
5
5
  SHA512:
6
- metadata.gz: 93ec8a28c7b4c6573b2be71c5a35fa41e6a3a4af560bc0f3e24d9bf22e43906916c9ecce04f1d0c2e4ee0feef3514dddc48a836df1d1f489180483c032a19261
7
- data.tar.gz: 646801d2effd4ca81ded335a12295b86c12d60575096b6fa50375947682ea567f53bd54949525d1cf5c29bf36ba9c15e97d33dc3b207c65b5d262010e9cb4b8b
6
+ metadata.gz: 9eaebd3dbb1bf74880eeafc2379a78e73d747f4a41a507152c0d3840eefff1b4f8ae3c6cdecfb15bb08e44b5f3d19779b1c265746148ddb569715ace6c17a834
7
+ data.tar.gz: 4569886b26db0d49d06fd0bb649997fc29d9fea665c59495448e0b1669581757003f3034536392bf8e4e5cb16955ce12b4ca3e2ffd90cb8af8057a8edb4f093a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.72.2](https://github.com/applandinc/appmap-ruby/compare/v0.72.1...v0.72.2) (2022-02-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Ensure request headers includes all relevant fields ([e866f68](https://github.com/applandinc/appmap-ruby/commit/e866f686be974dfe29f706564217e4ee302bb55a))
7
+
1
8
  ## [0.72.1](https://github.com/applandinc/appmap-ruby/compare/v0.72.0...v0.72.1) (2022-01-31)
2
9
 
3
10
 
data/lib/appmap/util.rb CHANGED
@@ -121,15 +121,21 @@ module AppMap
121
121
  blank?(headers) ? nil : headers
122
122
  end
123
123
 
124
- # Rack prepends HTTP_ to all client-sent headers.
125
-
126
124
  if !env['rack.version']
127
125
  warn "Request headers does not contain rack.version. HTTP_ prefix is not expected."
128
126
  return finalize_headers.call(env.dup)
129
127
  end
130
128
 
129
+ # Rack prepends HTTP_ to all client-sent headers (except Content-Type and Content-Length?).
130
+ # Apparently, it's following the CGI spec in doing so.
131
+ # https://datatracker.ietf.org/doc/html/rfc3875#section-4.1.18
131
132
  matching_headers = env
132
- .select { |k,v| k.start_with? 'HTTP_'}
133
+ .select { |k,v| k.start_with? 'HTTP_' }
134
+ .merge(
135
+ 'CONTENT_TYPE' => env['CONTENT_TYPE'],
136
+ 'CONTENT_LENGTH' => env['CONTENT_LENGTH'],
137
+ 'AUTHORIZATION' => env['AUTHORIZATION']
138
+ )
133
139
  .reject { |k,v| blank?(v) }
134
140
  .each_with_object({}) do |kv, memo|
135
141
  key = kv[0].sub(/^HTTP_/, '').split('_').map(&:capitalize).join('-')
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.72.1'
6
+ VERSION = '0.72.2'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.5.1'
9
9
 
@@ -33,7 +33,8 @@ describe 'Rails' do
33
33
  'http_server_request' => hash_including(
34
34
  'request_method' => 'POST',
35
35
  'normalized_path_info' => '/api/users',
36
- 'path_info' => '/api/users'
36
+ 'path_info' => '/api/users',
37
+ 'headers' => hash_including('Content-Type' => 'application/x-www-form-urlencoded'),
37
38
  ),
38
39
  'message' => include(
39
40
  hash_including(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.72.1
4
+ version: 0.72.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-31 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport