Ejemplo n.º 1
0
 public function processResponse(Horde_Controller_Request $request, Horde_Controller_Response $response, Horde_Controller $controller)
 {
     $body = $response->getBody();
     $body = gzencode($body);
     $response->setHeader('Content-Encoding', 'gzip');
     $response->setHeader('Content-Length', $this->_byteCount($body));
     $response->setBody($body);
     return $response;
 }
Ejemplo n.º 2
0
 /**
  * Fetch remote data.
  *
  * @param Horde_Controller_Response  $response The response handler.
  *
  * @return NULL
  */
 public function _passThrough(Horde_Controller_Response $response)
 {
     $url = $this->getUrlWithCredentials($this->_user->getPrimaryId(), $this->_user->getPassword());
     $origin = $this->_client->get($url);
     if ($origin->code !== 200) {
         $url = $this->getUrlWithCredentials($this->_user, 'XXX');
         throw new Horde_Kolab_FreeBusy_Exception_Unauthorized(sprintf('Unable to read free/busy information from %s', $url));
     }
     $response->setHeader('X-Redirect-To', $url);
     $response->setBody($origin->getStream());
 }
Ejemplo n.º 3
0
 /**
  */
 public function processRequest(Horde_Controller_Request $request, Horde_Controller_Response $response)
 {
     $response->setHeader('HTTP/1.0 404 ', 'Not Found');
     $response->setBody('<!DOCTYPE html><html><head><title>404 File Not Found</title></head><body><h1>404 File Not Found</h1></body></html>');
 }