bee
bee copied to clipboard
Upload: Having a slash `/` in `website-index-document` yields 500 instead of 400
This could be a 400 Bad Request instead, and the error message from the logs ("err: index document suffix must not include slash character") could appear in the response.
Also, when it is set to a nonexistent file, the response is 200 OK. This may be fine, more of a design choice.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
I was wondering, why is the /
in index-document
disallowed? This means that the index file can not be nested in some sub directory which I consider significant limitation.
Is this so this to protect the users who otherwise could upload some website in a subfolder (e.g. builld
), set the index-document
to build/index.html
which however would fail to load its resources because it would be served from bzz/<some_hash>/
and look for relative resources in /
and note build/
?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I suspect the issue results from the way in which the website-index-document is resolved and retrieved. IIRC, it doesn't redirect to the referenced document, but attempts to resolve it directly from the root node of the manifest or something like that.
The specification is that the website-index-document
cannot start with slash, but can contain slash at a later position.
It also needs to be validated when downloading with the /bzz
endpoint.