lib/async/http/cache/body.rb in async-http-cache-0.3.0 vs lib/async/http/cache/body.rb in async-http-cache-0.4.0
- old
+ new
@@ -26,11 +26,11 @@
module Async
module HTTP
module Cache
module Body
- TRAILERS = 'trailers'
+ TRAILER = 'trailer'
ETAG = 'etag'
def self.wrap(response, &block)
if body = response.body
if body.empty?
@@ -45,10 +45,10 @@
::Protocol::HTTP::Body::Digestable.wrap(response) do |wrapper|
response.headers.add(ETAG, wrapper.etag)
end
# Ensure the etag is listed as a trailer:
- response.headers.add(TRAILERS, ETAG)
+ response.headers.add(TRAILER, ETAG)
end
# Wrap the response with the callback:
::Protocol::HTTP::Body::Completable.wrap(response) do |error|
if error