/** * Parses the UNLOCK request and returns a request object. * * This method is responsible for parsing the UNLOCK request. It retrieves * the current request URI in $path and the request body as $body. The * return value, if no exception is thrown, is a valid {@link * ezcWebdavUnlockRequest} object. * * This method may be overwritten to adjust it to special client behaviour. * * @param string $path * @param string $body * @return ezcWebdavUnlockRequest */ protected function parseUnlockRequest($path, $body) { $request = new ezcWebdavUnlockRequest($path); $request->setHeaders(ezcWebdavServer::getInstance()->headerHandler->parseHeaders()); $request->setHeader('Lock-Token', $this->headerHandler->parseLockTokenHeader()); return $request; }
public function testValidateHeadersSuccess() { $req = new ezcWebdavUnlockRequest('/foo', '/bar'); $req->setHeader('Lock-Token', '<opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7>'); $req->validateHeaders(); }