Skip to content

DomainException thrown in case of errors - No responder registered for format xhtml+xml! #55619

@nickvergessen

Description

@nickvergessen

Opposed to Controller::getResponderByHTTPHeader() which was used before, this here no longer checks if there is a responder registered and does not fall back to the default type correctly.
E.g. When you create a share for a file that can not have a preview (e.g. PDF without PDF being enabled), instead of having a proper 404, the response now is:

Technische Details

    Entfernte Adresse: ::1
    Anfragekennung: 3RuRvo3TEr52XxYi3pq6
    Typ: DomainException
    Code: 0
    Nachricht: No responder registered for format xhtml+xml!
    Datei: /home/nickv/Nextcloud/33/server/lib/public/AppFramework/Controller.php
    Zeile: 139


Trace

#0 /home/nickv/Nextcloud/33/server/lib/private/AppFramework/Http/Dispatcher.php(227): OCP\AppFramework\Controller->buildResponse(Object(OCP\AppFramework\Http\DataResponse), '...')
#1 /home/nickv/Nextcloud/33/server/lib/private/AppFramework/Http/Dispatcher.php(118): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_Sharing\Controller\PublicPreviewController), '...')
#2 /home/nickv/Nextcloud/33/server/lib/private/AppFramework/App.php(153): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_Sharing\Controller\PublicPreviewController), '...')
#3 /home/nickv/Nextcloud/33/server/lib/private/Route/Router.php(321): OC\AppFramework\App::main('...', '...', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#4 /home/nickv/Nextcloud/33/server/lib/base.php(1096): OC\Route\Router->match('...')
#5 /home/nickv/Nextcloud/33/server/index.php(25): OC::handleRequest()
#6 {main}

This works properly until Nextcloud 31.

Originally posted by @nickvergessen in #54627

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions