Show 404 archives when a resource had 200 response previously

This commit is contained in:
hartator 2016-09-18 12:23:33 -05:00
parent 6f10fc64ff
commit 87eee70969

View File

@ -10,9 +10,11 @@ module ArchiveAPI
end end
def parameters_for_api def parameters_for_api
parameters = "&fl=timestamp,original&collapse=original&gzip=false" parameters = "&fl=timestamp,original&gzip=false"
unless @all if @all
parameters += "&filter=statuscode:200" parameters += "&collapse=digest"
else
parameters += "&filter=statuscode:200&collapse=original"
end end
if @from_timestamp and @from_timestamp != 0 if @from_timestamp and @from_timestamp != 0
parameters += "&from=" + @from_timestamp.to_s parameters += "&from=" + @from_timestamp.to_s