diff --git a/lib/httparty/logger/apache_logger.rb b/lib/httparty/logger/apache_logger.rb
index <HASH>..<HASH> 100644
--- a/lib/httparty/logger/apache_logger.rb
+++ b/lib/httparty/logger/apache_logger.rb
@@ -14,7 +14,7 @@ module HTTParty
         current_time   = Time.now.strftime("%Y-%m-%d %H:%M:%S %z")
         http_method    = request.http_method.name.split("::").last.upcase
         path           = request.path.to_s
-        content_length = response['Content-Length']
+        content_length = response.respond_to?(:headers) ? response.headers['Content-Length'] : response['Content-Length']
         @logger.send @level, "[#{TAG_NAME}] [#{current_time}] #{response.code} \"#{http_method} #{path}\" #{content_length || "-"} "
       end
     end
Redirects and final responses handles Content-Length differently