class Chef::HTTP::ValidateContentLength::ContentLengthCounter

Attributes

content_length[RW]

Public Class Methods

new() click to toggle source
# File lib/chef/http/validate_content_length.rb, line 34
def initialize
  @content_length = 0
end

Public Instance Methods

handle_chunk(chunk) click to toggle source
# File lib/chef/http/validate_content_length.rb, line 38
def handle_chunk(chunk)
  @content_length += chunk.bytesize
  chunk
end