Opened 2 years ago
Last modified 10 months ago
#17974 new bug
WebPositive refuses to render local html files
Reported by: | kallisti5 | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/WebPositive | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Navigating to local files, WebPositive doesn't attempt to render them as html documents.
WebPositive demo.htm
shows as...
but just shows the source
Attachments (1)
Change History (5)
by , 2 years ago
Attachment: | demo_1.png added |
---|
comment:1 by , 2 years ago
comment:2 by , 2 years ago
text/HTML already a mimetype for .htm / .html.
Preferred application: WebPositive
looking over the logic in the WebPositive app.. looks like special cases for file:// aren't triggering rendering properly?
comment:3 by , 2 years ago
What nephele means is, your file needs to have the text/html MIME type in its xattrs. If it has text/plain or something else, it is rendered as plain text.
MIME sniffing will be used if the file has no MIME type attribute, but the sniffing rules for HTML and XHTML aren't very reliable, so it may not do the right detection.
The file extension is currently not used for the MIMe sniffing (not just for Web+, this is global to the MIME sniffing system). So it doesn't matter if your file is named demo.htm or demo.txt, what matters is the mimetype xattr.
comment:4 by , 10 months ago
kallisti5, did you try adding the correct mimetype to the file as suggested?
try adding text/html as mime type.
This is a bit difficult as text editors often overwrite this and set it back to text/plain