diff --git a/lib/plugins/urlanalyzer.ex b/lib/plugins/urlanalyzer.ex index 4c03de8..598d91a 100644 --- a/lib/plugins/urlanalyzer.ex +++ b/lib/plugins/urlanalyzer.ex @@ -184,7 +184,7 @@ defmodule Nulform.Plugins.URLAnalyzer do if status == 301 or status == 302 or status == 303 or status == 307 do new_url = to_string headers['location'] - # Fix non-absolute location URIs by retard webdevs + # Fix non-absolute location URIs if not String.starts_with? String.downcase(new_url), ["http://", "https://"] do IO.puts "Fixing " <> new_url <> " to..." new_url = URI.parse(url).scheme <> "://" <> domain <> "/" <> String.lstrip new_url, "/" @@ -195,7 +195,7 @@ defmodule Nulform.Plugins.URLAnalyzer do if mode != :get and (status != 200 or Enum.any? @parseable_types, fn(x) -> x == content_type end) do analyze_url url, redirects + 1, :get else - # Maybe gunzip body since retard server send gzip for us + # Maybe gunzip body since server send gzip for us body = maybe_gunzip headers, body IO.inspect mode