You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to open it as a file://... url. Upload it to a web server (serving it as MIME type text/html) and try to open it via an https://... url.
Expected behaviour
vimb treats the file the same over file://... and https://....
Actual behaviour
vimb has no complaints when accessing it over https://...: a blank page is shown. (I actually had a file with some real content; the content is shown without trouble.) But via file:///... I see a red box with this message:
This page contains the following errors:
error on line 1 at column 2: StartTag: invalid element name
Below is a rendering of the page up to the first error.
The text was updated successfully, but these errors were encountered:
falsifian
changed the title
"This page contains the following errors:..." when opening a file:/// url ending in .html; page works fine over https with mime type text/html`
"This page contains the following errors:..." when opening a file:/// url ending in .html; page works fine over https with mime type text/htmlJul 25, 2023
@falsifian This might be related to determining the file mime type from the local file. As I know the mime type is determined by mime-magic. I think your local file ist considered as XML or xhtml, and not as HTML 5 so the XML validation is applied.
The version requested from webserver uses text/html. What shows your system for "file PathToFile"?
This is on my OpenBSD-current box, on which I found the bug. For completeness: on Linux it gives a different answer: the file command run on a Debian 10 machine on the exact same file (sha256 checksum 5244c900ab5f11e61dd191a5c39a622b6ae1320c6227c09acbd79ca359e87fea) says HTML document, ASCII text.
Steps to reproduce
Create a file
~/f.html
with the following text (which may violate some standard):Try to open it as a
file://...
url. Upload it to a web server (serving it as MIME typetext/html
) and try to open it via anhttps://...
url.Expected behaviour
vimb treats the file the same over
file://...
andhttps://...
.Actual behaviour
vimb has no complaints when accessing it over
https://...
: a blank page is shown. (I actually had a file with some real content; the content is shown without trouble.) But viafile:///...
I see a red box with this message:The text was updated successfully, but these errors were encountered: