If gethostbyname is passed an IP address to start with it returns the IP address so:-

  $url_parts = parse_url(is_string($args[1]) ? $args[1] : $args[1]->url);
  $op = (gethostbyname($url_parts['host']) !== $url_parts['host']) ? $op : FALSE;

evaluates false and $op gets clobbered when it maybe valid. Would drupal's valid_url() not be better or does simpleapi accept other schema?

Tagged priority minor as - OK, I only noticed this because DNS happened not to be working with apache at a moment. It wasn't obvious what the error was either (sending it to simplepie and logging/displaying the error - curl dns lookup - would have been easier to debug). I'm guessing IPs in url's are not so common - but they are valid.

Comments

aron novak’s picture

Assigned: Unassigned » aron novak
Status: Active » Fixed

Thanks for the report, now it's fixed. The next daily dev package will contain the fix.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.