lib/httpx/altsvc.rb in httpx-0.11.3 vs lib/httpx/altsvc.rb in httpx-0.12.0
- old
+ new
@@ -35,9 +35,10 @@
end
@altsvcs[origin].reject { |entry| entry["noop"] }
end
def emit(request, response)
+ return unless response.respond_to?(:headers)
# Alt-Svc
return unless response.headers.key?("alt-svc")
origin = request.origin
host = request.uri.host