Skip to content

Commit 53d421b

Browse files
committed
Guard against nil content_type when checking formats.
1 parent f8e0726 commit 53d421b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rdf/format.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def self.each(file_name: nil,
8484
when content_type
8585
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
8686
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
87-
mime_type = content_type.to_s.split(';').first # remove any media type parameters
87+
mime_type = content_type.to_s.split(';').first.to_s # remove any media type parameters
8888

8989
# Ignore text/plain, a historical encoding for N-Triples, which is
9090
# problematic in format detection, as many web servers will serve

0 commit comments

Comments
 (0)