Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: webdav 404 shows "Internal Server Error" as response #49002

Closed
4 of 8 tasks
tobiasKaminsky opened this issue Oct 30, 2024 · 1 comment
Closed
4 of 8 tasks

[Bug]: webdav 404 shows "Internal Server Error" as response #49002

tobiasKaminsky opened this issue Oct 30, 2024 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 31-feedback bug feature: dav

Comments

@tobiasKaminsky
Copy link
Member

⚠️ This issue respects the following points: ⚠️

Bug description

PROPFIND on latest master shows 404, but "Internal Server Error" as content.

Steps to reproduce

  1. PROPFIND to a non-existing file
  2. curl --request PROPFIND --url http://localhost/nc/remote.php/dav/files/tobi/eaea
  3. see
<?xml version="1.0" encoding="utf-8"?>
<d:error
	xmlns:d="DAV:"
	xmlns:s="http://sabredav.org/ns">
	<s:exception>Internal Server Error</s:exception>
	<s:message>
		The server was unable to complete your request.		If this happens again, please send the technical details below to the server administrator.		More details can be found in the server log.			</s:message>
	<s:technical-details>
		<s:remote-address>127.0.0.1</s:remote-address>
		<s:request-id>22m49CndhYZvWBAIq8cr</s:request-id>
		<s:type>Sabre\DAV\Exception\NotFound</s:type>
		<s:code>0</s:code>
		<s:message>File with name //eaea could not be located</s:message>
		<s:file>/srv/http/nc/apps/dav/lib/Connector/Sabre/Directory.php</s:file>
		<s:line>188</s:line>
		<s:stacktrace>
			#0 /srv/http/nc/3rdparty/sabre/dav/lib/DAV/Tree.php(95): OCA\DAV\Connector\Sabre\Directory-&gt;getChild(&#039;eaea&#039;)
#1 /srv/http/nc/3rdparty/sabre/dav/lib/DAV/Server.php(971): Sabre\DAV\Tree-&gt;getNodeForPath(&#039;files/tobi/eaea&#039;)
#2 /srv/http/nc/3rdparty/sabre/dav/lib/DAV/Server.php(1662): Sabre\DAV\Server-&gt;getPropertiesIteratorForPath(&#039;files/tobi/eaea&#039;, Array, 1)
#3 /srv/http/nc/3rdparty/sabre/dav/lib/DAV/Server.php(1647): Sabre\DAV\Server-&gt;writeMultiStatus(Object(Sabre\Xml\Writer), Object(Generator), false)
#4 /srv/http/nc/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(346): Sabre\DAV\Server-&gt;generateMultiStatus(Object(Generator), false)
#5 /srv/http/nc/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin-&gt;httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#6 /srv/http/nc/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server-&gt;emit(&#039;method:PROPFIND&#039;, Array)
#7 /srv/http/nc/apps/dav/lib/Connector/Sabre/Server.php(43): Sabre\DAV\Server-&gt;invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#8 /srv/http/nc/apps/dav/lib/Server.php(380): OCA\DAV\Connector\Sabre\Server-&gt;start()
#9 /srv/http/nc/apps/dav/appinfo/v2/remote.php(19): OCA\DAV\Server-&gt;exec()
#10 /srv/http/nc/remote.php(145): require_once(&#039;/srv/http/nc/ap...&#039;)
#11 {main}		</s:stacktrace>
	</s:technical-details>
</d:error>

Expected behavior

Correct error message:

<?xml version="1.0" encoding="utf-8"?>
<d:error
	xmlns:d="DAV:"
	xmlns:s="http://sabredav.org/ns">
	<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
	<s:message>File with name //eaea could not be located</s:message>
</d:error>

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@tobiasKaminsky tobiasKaminsky added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 30, 2024
@tobiasKaminsky tobiasKaminsky changed the title [Bug]: webdav 404 shows "Internal Server Error" as resonse [Bug]: webdav 404 shows "Internal Server Error" as response Oct 30, 2024
@kesselb kesselb closed this as completed Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 31-feedback bug feature: dav
Projects
None yet
Development

No branches or pull requests

4 participants