Esempio n. 1
0
 public function testBest_xhtml_type()
 {
     // For now it should always return 'text/html'
     $this->assertEquals(\BeeHub::best_xhtml_type(), 'text/html', 'BeeHub::best_xml_type() should return correct value');
 }
Esempio n. 2
0
 /**
  * Gets the getcontenttype property
  *
  * @return  string  The content-type
  */
 public function user_prop_getcontenttype()
 {
     return BeeHub::best_xhtml_type() . '; charset="utf-8"';
 }
Esempio n. 3
0
 /**
  * This method is called when DAV receives an 401 Unauthenticated exception.
  * @return bool true if a response has been sent to the user.
  */
 public function unauthorized()
 {
     DAV::header(array('WWW-Authenticate' => 'Basic realm="' . BeeHub::$CONFIG['authentication']['realm'] . '"', 'Content-Type' => BeeHub::best_xhtml_type()));
     BeeHub::htmlError(file_get_contents(dirname(dirname(__FILE__)) . '/views/error_unauthorized.html'), DAV::HTTP_UNAUTHORIZED);
 }