function httprl_get_server_schema in HTTP Parallel Request & Threading Library 7
Same name and namespace in other branches
- 6 httprl.module \httprl_get_server_schema()
Return the server schema (http or https).
Return value
string http OR https.
1 call to httprl_get_server_schema()
- _httprl_build_drupal_root in ./
httprl.module - Helper function to build an URL for asynchronous requests to self.
File
- ./
httprl.module, line 2739 - HTTP Parallel Request Library module.
Code
function httprl_get_server_schema() {
return isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || isset($_SERVER['HTTP_HTTPS']) && $_SERVER['HTTP_HTTPS'] == 'on' ? 'https' : 'http';
}