lib/down/net_http.rb in down-5.2.0 vs lib/down/net_http.rb in down-5.2.1
- old
+ new
@@ -214,10 +214,12 @@
end
rescue => exception
request_error!(exception)
end
- if response.is_a?(Net::HTTPRedirection)
+ if response.is_a?(Net::HTTPNotModified)
+ raise Down::NotModified
+ elsif response.is_a?(Net::HTTPRedirection)
raise Down::TooManyRedirects if follows_remaining == 0
# fail if redirect URI is not a valid http or https URL
begin
location = ensure_uri(response["Location"], allow_relative: true)