Projet

Général

Profil

Révision cd5c298a

Ajouté par Geoffroy Desvernay il y a environ 5 ans

MAJ 7.60 -> 7.62

Voir les différences:

drupal7/includes/common.inc
867 867
      // Make the socket connection to a proxy server.
868 868
      $socket = 'tcp://' . $proxy_server . ':' . variable_get('proxy_port', 8080);
869 869
      // The Host header still needs to match the real request.
870
      $options['headers']['Host'] = $uri['host'];
871
      $options['headers']['Host'] .= isset($uri['port']) && $uri['port'] != 80 ? ':' . $uri['port'] : '';
870
      if (!isset($options['headers']['Host'])) {
871
        $options['headers']['Host'] = $uri['host'];
872
        $options['headers']['Host'] .= isset($uri['port']) && $uri['port'] != 80 ? ':' . $uri['port'] : '';
873
      }
872 874
      break;
873 875

  
874 876
    case 'http':
......
878 880
      // RFC 2616: "non-standard ports MUST, default ports MAY be included".
879 881
      // We don't add the standard port to prevent from breaking rewrite rules
880 882
      // checking the host that do not take into account the port number.
881
      $options['headers']['Host'] = $uri['host'] . ($port != 80 ? ':' . $port : '');
883
      if (!isset($options['headers']['Host'])) {
884
        $options['headers']['Host'] = $uri['host'] . ($port != 80 ? ':' . $port : '');
885
      }
882 886
      break;
883 887

  
884 888
    case 'https':
885 889
      // Note: Only works when PHP is compiled with OpenSSL support.
886 890
      $port = isset($uri['port']) ? $uri['port'] : 443;
887 891
      $socket = 'ssl://' . $uri['host'] . ':' . $port;
888
      $options['headers']['Host'] = $uri['host'] . ($port != 443 ? ':' . $port : '');
892
      if (!isset($options['headers']['Host'])) {
893
        $options['headers']['Host'] = $uri['host'] . ($port != 443 ? ':' . $port : '');
894
      }
889 895
      break;
890 896

  
891 897
    default:

Formats disponibles : Unified diff