lib/timber/events/http_request.rb in timber-2.5.0 vs lib/timber/events/http_request.rb in timber-2.5.1

- old
+ new

@@ -12,10 +12,10 @@ attr_reader :body, :content_length, :headers, :host, :method, :path, :port, :query_string, :request_id, :scheme, :service_name def initialize(attributes) @body = attributes[:body] && Util::HTTPEvent.normalize_body(attributes[:body]) - @content_length = attributes[:content_length] + @content_length = Timber::Util::Object.try(attributes[:content_length], :to_i) @headers = Util::HTTPEvent.normalize_headers(attributes[:headers]) @host = attributes[:host] @method = Util::HTTPEvent.normalize_method(attributes[:method]) || raise(ArgumentError.new(":method is required")) @path = attributes[:path] @port = attributes[:port] \ No newline at end of file