You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the original URL leads to a number of redirects, eventually ending at hhttp://www.world-of-nlp.net, which is a valid URI, but not a HTTP URL. As such the URI will get parsed, but it will be parsed to a URI::Generic instance rather than a URI::HTTP instance as FastImage expects when trying to call request_uri on it. Hence the NoMethodError.
It would probably best to add a check like @parsed_uri.is_a? URI::HTTP. Such a check would also be better then checking the scheme property as is being done in initialize().
The text was updated successfully, but these errors were encountered:
When calling the following:
This will yields a
NoMethodError
exception on https://github.com/sdsykes/fastimage/blob/master/lib/fastimage.rb#L301.The problem is that the original URL leads to a number of redirects, eventually ending at
hhttp://www.world-of-nlp.net
, which is a valid URI, but not a HTTP URL. As such the URI will get parsed, but it will be parsed to aURI::Generic
instance rather than aURI::HTTP
instance as FastImage expects when trying to callrequest_uri
on it. Hence theNoMethodError
.It would probably best to add a check like
@parsed_uri.is_a? URI::HTTP
. Such a check would also be better then checking thescheme
property as is being done ininitialize()
.The text was updated successfully, but these errors were encountered: