uploads: fix incorrect remote sizes on pixiv uploads.
Bug: the uploads page showed a remote size of 146 bytes for Pixiv uploads. Cause: we didn't spoof the Referer header when making the HEAD request for the image, causing Pixiv to return a 403 error. Also fix the case where the Content-Length header is absent.
This commit is contained in:
@@ -14,7 +14,7 @@ module Sources
|
||||
assert_equal(page_url, site.page_url) if page_url.present?
|
||||
assert_equal(tags.sort, site.tags.map(&:first).sort)
|
||||
assert_equal(profile_url.to_s, site.profile_url.to_s)
|
||||
assert_equal(size, site.size)
|
||||
assert_equal(size, site.remote_size)
|
||||
assert_nothing_raised { site.to_h }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user