GET request to non-existing file doesn't have response body
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
## Describe the bug
A GET request to non-existing file doesn't have response body and Content-Type header
## Steps to reproduce
1. Try to GET non-existing file
```bash
curl -uadmin:admin -XGET "https://host.docker.internal:9200/remote.php/dav/files/admin/nonExistentFile" -vk
```
## Expected behavior
To have response body like in oC10:
```xml
< HTTP/1.1 404 Not Found
< Content-Length: 243
< Content-Type: application/xml; charset=utf-8
...
Sabre\DAV\Exception\NotFound
File with name nonExistentFile could not be located
```
## Actual behavior
Has no response body and no `Content-Type`:
```xml
< HTTP/1.1 404 Not Found
< Access-Control-Allow-Origin: *
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Date: Mon, 10 Oct 2022 10:47:47 GMT
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Robots-Tag: none
< X-Xss-Protection: 1; mode=block
```
## Setup
Please describe how you started the server and provide a list of relevant environment variables or configuration files.
```console
OCIS: `Infinite Scale 2.0.0-beta.8+7daf3c378 Community`
```
## Additional context
Old issues: https://github.com/owncloud/ocis/issues/1282
Contributor guide
Assessment
This issue has not been assessed yet.