From bf531dcaeb43b332a4ae01e190ad50df260bf5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu> Date: Tue, 11 May 2010 09:43:18 +0000 Subject: [PATCH] #499774 by jbrauer: feed URL handling was missing from core (alias for http) --- includes/common.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/common.inc b/includes/common.inc index b065f77d6521..1e1a1cc0def5 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -462,6 +462,7 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = switch ($uri['scheme']) { case 'http': + case 'feed': $port = isset($uri['port']) ? $uri['port'] : 80; $host = $uri['host'] . ($port != 80 ? ':'. $port : ''); $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15); @@ -985,7 +986,7 @@ function valid_url($url, $absolute = FALSE) { if ($absolute) { return (bool)preg_match(" /^ # Start at the beginning of the text - (?:ftp|https?):\/\/ # Look for ftp, http, or https schemes + (?:ftp|https?|feed):\/\/ # Look for ftp, http, https or feed schemes (?: # Userinfo (optional) which is typically (?:(?:[\w\.\-\+!$&'\(\)*\+,;=]|%[0-9a-f]{2})+:)* # a username or a username and password (?:[\w\.\-\+%!$&'\(\)*\+,;=]|%[0-9a-f]{2})+@ # combination -- GitLab