/[drupal]/drupal/includes/common.inc
ViewVC logotype

Diff of /drupal/includes/common.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.611.2.24 by drumm, Wed May 13 17:10:36 2009 UTC revision 1.611.2.25 by drumm, Wed Sep 16 17:29:09 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: common.inc,v 1.611.2.23 2009/04/30 00:13:48 drumm Exp $  // $Id: common.inc,v 1.611.2.24 2009/05/13 17:10:36 drumm Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 427  function drupal_http_request($url, $head Line 427  function drupal_http_request($url, $head
427    // Parse the URL, and make sure we can handle the schema.    // Parse the URL, and make sure we can handle the schema.
428    $uri = parse_url($url);    $uri = parse_url($url);
429    
430      if ($uri == FALSE) {
431        $result->error = 'unable to parse URL';
432        $result->code = -1001;
433        return $result;
434      }
435    
436      if (!isset($uri['scheme'])) {
437        $result->error = 'missing schema';
438        $result->code = -1002;
439        return $result;
440      }
441    
442    switch ($uri['scheme']) {    switch ($uri['scheme']) {
443      case 'http':      case 'http':
444        $port = isset($uri['port']) ? $uri['port'] : 80;        $port = isset($uri['port']) ? $uri['port'] : 80;
# Line 441  function drupal_http_request($url, $head Line 453  function drupal_http_request($url, $head
453        break;        break;
454      default:      default:
455        $result->error = 'invalid schema '. $uri['scheme'];        $result->error = 'invalid schema '. $uri['scheme'];
456          $result->code = -1003;
457        return $result;        return $result;
458    }    }
459    

Legend:
Removed from v.1.611.2.24  
changed lines
  Added in v.1.611.2.25

  ViewVC Help
Powered by ViewVC 1.1.3