Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit b701f49

Browse files
author
Mark Gritter
authored
Convert all headers (and cookies, and parameters) to strings. (#11)
Remove redundant .to_s now that conversion is done earlier.
1 parent eee9487 commit b701f49

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/akita/har_logger/har_utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def self.hashToList(hash)
3939
hash.reduce([]) { |accum, (k, v)|
4040
accum.append({
4141
name: fixEncoding(k),
42-
value: fixEncoding(v),
42+
value: fixEncoding(v.to_s),
4343
})
4444
}
4545
end

lib/akita/har_logger/http_request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def getHeadersSize(env)
163163
# for the CRLF on the blank line.
164164
getHeaders(env).reduce(line_length + 2) { |accum, entry|
165165
# Header-Name: header value<CR><LF>
166-
accum + entry[:name].length + 2 + entry[:value].to_s.length + 2
166+
accum + entry[:name].length + 2 + entry[:value].length + 2
167167
}
168168
end
169169

lib/akita/har_logger/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module Akita
44
module HarLogger
5-
VERSION = "0.2.7"
5+
VERSION = "0.2.8"
66
end
77
end

0 commit comments

Comments
 (0)