aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/gist_tag.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb
index f5123cb9..0828d270 100644
--- a/plugins/gist_tag.rb
+++ b/plugins/gist_tag.rb
@@ -88,6 +88,9 @@ module Jekyll
def handle_gist_redirecting(data)
redirected_url = data.header['Location']
+ if redirected_url.nil? || redirected_url.empty?
+ raise ArgumentError, "GitHub replied with a 302 but didn't provide a location in the response headers."
+ end
get_web_content(redirected_url)
end