Skip to content
Snippets Groups Projects
Unverified Commit 6e804d55 authored by hiroshisuga's avatar hiroshisuga Committed by GitHub
Browse files

response code must be 200 (#2916)

parent 8d3a3457
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ module Joiner ...@@ -53,6 +53,7 @@ module Joiner
http = Net::HTTP.new(uri.host, uri.port) http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == 'https' http.use_ssl = true if uri.scheme == 'https'
response = http.request_head(uri) response = http.request_head(uri)
return false if response.code != "200"
return response['content-length'].to_i < Rails.configuration.max_avatar_size return response['content-length'].to_i < Rails.configuration.max_avatar_size
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment