summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/THttpRequest.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index bc3f9912..12eb1f0e 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -321,11 +321,17 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
return $_SERVER['REQUEST_METHOD'];
}
+ /**
+ * @param boolean forces http or https on a uri
+ */
public function setForceSecureConnection($value)
{
$this->_forceSecureConnection=TPropertyValue::ensureBoolean($value);
}
+ /**
+ * @return boolean if https is forced on a uri
+ */
public function getForceSecureConnection()
{
return $this->_forceSecureConnection;
@@ -425,7 +431,14 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
*/
public function getBrowser()
{
- return get_browser();
+ try
+ {
+ return get_browser();
+ }
+ catch(TPhpErrorException $e)
+ {
+ throw new TConfigurationException('httprequest_browscap_required');
+ }
}
/**