Add support for "application/x-extension-html" mimetype in R expression, because some systems use this mimetype for html, instead of "text/html"
BUG: 394018
FIXED-IN: 18.04.2
asemke |
Add support for "application/x-extension-html" mimetype in R expression, because some systems use this mimetype for html, instead of "text/html"
BUG: 394018
FIXED-IN: 18.04.2
No Linters Available |
No Unit Test Coverage |
@asemke, Could you verify, that this commit don't breaks vector output for you? My system use mime application/x-extension-html for html, so I can't check, that after this commit R expression still can work with mime text/html.
No, this breaks the output for me:
What is the mime type for the generated files on your system? What does 'file' shows for the generated html files? For me it is:
alex@notebook:~/Projekte/cantor/build_debug (arcpatch-D12998 $%)>file /tmp/cantor_rserver-8561/Rtable0.html /tmp/cantor_rserver-8561/Rtable0.html: HTML document, ASCII text, with no line terminators
Could you add log from console for this entry?
What is the mime type for the generated files on your system? What does 'file' shows for the generated html files? For me it is:
alex@notebook:~/Projekte/cantor/build_debug (arcpatch-D12998 $%)>file /tmp/cantor_rserver-8561/Rtable0.html /tmp/cantor_rserver-8561/Rtable0.html: HTML document, ASCII text, with no line terminators
mmmm1998:/tmp/cantor_rserver-19234 [16:19:25]$ file Rtable3.html Rtable3.html: HTML document, ASCII text, with no line terminators
Very intresting:
[16:25:08]$ mimetype /tmp/cantor_rserver-19234/Rtable3.html /tmp/cantor_rserver-19234/Rtable3.html: text/html
but in log there is another mimetype
showing files: ("/tmp/cantor_rserver-19234/Rtable3.html") MimeType: "application/x-extension-html"
@asemke, which Qt version do you have? My version is 5.9.5.
showing files: ("/tmp/cantor_rserver-8561/Rtable1.html") MimeType: "text/html" its a HTML document content: "<table border=\"1\" align=\"center\" valign=\"center\"><tr><td bgcolor=\"#AAAAAA\">[1]</td><td>1</td><td>2</td><td>3</td></tr><table>" settting result to a type 1 result update Entry
I have
alex@notebook:~/Projekte/cantor/build_debug (arcpatch-D12998 $%)>file --mime-type /tmp/cantor_rserver-8561/Rtable1.html /tmp/cantor_rserver-8561/Rtable1.html: text/html
and
showing files: ("/tmp/cantor_rserver-8561/Rtable1.html") MimeType: "text/html"
with Qt 5.10.
yes, this works.
For me it is also sufficient to check in rexpression.cpp:106 for type.inherits(QLatin1String("text/plain")) only - application/x-extension-html inherits apparently from text/plain.
Your system, as I see, doesn't use application/x_extension-html (uses text/html instead), so you can remove condition for this mimetype without problem.
But removing this condition for me gives:
cannot open file /tmp/cantor_rserver-14014/Rtable1.html: Unknown MimeType
This would mean that application/x-extension-hmtl doesn't inherit from text/plain... Ok. Let's submit this. bool isHtml in line 110 can be defined const.