Open falsifian opened 1 year ago
@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"?
$ file f.html
f.html: exported SGML document text
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: