diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-08-13 20:15:27 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-08-13 20:15:27 +0000 |
| commit | 10b95da1ed18f629c3146cc2e18fffc1ba61fe2a (patch) | |
| tree | 8d7a2046df3f988f238eede92c30df690d6faab9 /roundcubemail/program/include/rcube_shared.inc | |
| parent | d2131a9fafcfe5a3ec36792616d1896fb94a9ca9 (diff) | |
Fix bugs introduced with latest changes
git-svn-id: https://svn.roundcube.net/trunk@675 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_shared.inc')
| -rw-r--r-- | roundcubemail/program/include/rcube_shared.inc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index acf98c938..eeca2b57a 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/program/include/rcube_shared.inc @@ -523,6 +523,27 @@ function rc_strrpos($haystack, $needle, $offset=0) /** + * Read a specific HTTP request header + * + * @param string Header name + * @return string Header value or null if not available + */ +function rc_request_header($name) +{ + if (function_exists('getallheaders')) + { + $hdrs = getallheaders(); + return $hdrs[$name]; + } + else + { + $key = "HTTP_" . strtoupper(strtr($name, "-", "_")); + return $_SERVER[$key]; + } +} + + +/** * Replace the middle part of a string with ... * if it is longer than the allowed length * |
