snowplow-referer-parser / ruby-referer-parser

3 stars 4 forks source link

Exception on "http://" and "https://" parse #12

Open joao-esteves opened 3 years ago

joao-esteves commented 3 years ago

If 'http://' or 'https://' are passed to parse, the following exception occurs: undefined methoddowncase!' for nil:NilClass`

This happens here: https://github.com/snowplow-referer-parser/ruby-referer-parser/blob/bb9e34479b785f3888d9c5f385aa2ba1197c0dbc/lib/referer-parser/parser.rb#L128

domain is nil because the following aggregation of original lines of codes is nil: URI.parse('http://'.to_s).host.