Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -913,11 +913,6 @@ public static function handleRequest() {
throw $e;
} catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
//header('HTTP/1.0 404 Not Found');
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
} catch (Symfony\Component\Routing\Exception\MethodNotAllowedException $e) {
OC_Response::setStatus(405);
return;
Expand Down
64 changes: 0 additions & 64 deletions lib/public/Http/HttpEvents.php

This file was deleted.

11 changes: 0 additions & 11 deletions ocs/v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* @author Thomas Müller <[email protected]>
* @author Tom Needham <[email protected]>
* @author Vincent Petry <[email protected]>
* @author Semih Serhat Karakaya <[email protected]>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
* @license AGPL-3.0
Expand Down Expand Up @@ -64,11 +63,6 @@
OC::$server->getRouter()->match('/ocs'.\OC::$server->getRequest()->getRawPathInfo());
return;
} catch (ResourceNotFoundException $e) {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
// Fall through the not found
} catch (MethodNotAllowedException $e) {
OC_API::setContentType();
Expand All @@ -91,11 +85,6 @@
} catch (LoginException $e) {
OC_API::respond(new Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'Unauthorised'), OC_API::requestedFormat());
} catch (ResourceNotFoundException $e) {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
OC_API::setContentType();
OC_API::notFound();
} catch (MethodNotAllowedException $e) {
Expand Down
10 changes: 0 additions & 10 deletions public.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@

if (!$pathInfo && $request->getParam('service', '') === '') {
\header('HTTP/1.0 404 Not Found');
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
exit;
} elseif ($request->getParam('service', '')) {
$service = $request->getParam('service', '');
Expand All @@ -58,11 +53,6 @@
$file = \OC::$server->getConfig()->getAppValue('core', 'public_' . \strip_tags($service));
if ($file === null) {
\header('HTTP/1.0 404 Not Found');
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
exit;
}

Expand Down
10 changes: 0 additions & 10 deletions remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ function resolveService($service) {
$request = \OC::$server->getRequest();
$pathInfo = $request->getPathInfo();
if ($pathInfo === false || $pathInfo === '') {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
}
if (!$pos = \strpos($pathInfo, '/', 1)) {
Expand All @@ -138,11 +133,6 @@ function resolveService($service) {
$file = resolveService($service);

if ($file === null) {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->dispatch(\OCP\Http\HttpEvents::EVENT_404, new OCP\Http\HttpEvents(
\OCP\Http\HttpEvents::EVENT_404,
OC::$server->getRequest()
));
throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
}

Expand Down