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...

file:///boot/home/demo.htm

but just shows the source

Attachments (1)

demo_1.png (644.5 KB ) - added by kallisti5 2 years ago.

Download all attachments as: .zip

Change History (5)

by kallisti5, 2 years ago

Attachment: demo_1.png added

comment:1 by nephele, 2 years ago

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

comment:2 by kallisti5, 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 pulkomandy, 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 nephele, 10 months ago

kallisti5, did you try adding the correct mimetype to the file as suggested?

Note: See TracTickets for help on using tickets.