diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-01-14 12:15:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-01-14 12:15:38 +0000 |
commit | dba81743a6e1e8178801f11ead577978581b74ca (patch) | |
tree | d13f4565c7b554476e179704b5f17d3a7ef11e2a /modules/simpletest/tests | |
parent | 77936aef4c487e8b3265cb28e72d104004cb1172 (diff) | |
download | brdo-dba81743a6e1e8178801f11ead577978581b74ca.tar.gz brdo-dba81743a6e1e8178801f11ead577978581b74ca.tar.bz2 |
- Patch #346285 by grendzy, Damien Tournoud, thekevinday et al: fixed problem when HTTP_HOST is not transmitted.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r-- | modules/simpletest/tests/bootstrap.test | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test index 29191eeaf..a27f8cfaf 100644 --- a/modules/simpletest/tests/bootstrap.test +++ b/modules/simpletest/tests/bootstrap.test @@ -68,7 +68,7 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { // Cluster environment. $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'] = $this->cluster_ip; $this->assertTrue( - ip_address(true) == $this->cluster_ip, + ip_address(TRUE) == $this->cluster_ip, t('Cluster environment got cluster client IP') ); $_SERVER['HTTP_HOST'] = 'security/.drupal.org:80'; @@ -81,6 +81,10 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { $this->assertFalse(drupal_valid_http_host(), t('HTTP_HOST with .. is invalid')); $_SERVER['HTTP_HOST'] = '[::1]:80'; // IPv6 loopback address $this->assertTrue(drupal_valid_http_host(), t('HTTP_HOST containing IPv6 loopback is valid')); + $_SERVER['HTTP_HOST'] = ''; + $this->assertTrue(drupal_valid_http_host(), t('Empty HTTP_HOST is valid')); + $_SERVER['HTTP_HOST'] = NULL; + $this->assertTrue(drupal_valid_http_host(), t('NULL HTTP_HOST is valid')); } } |