Bug 1568493 - Trying to open html file results in download
Summary: Trying to open html file results in download
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: epiphany
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Catanzaro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-17 15:45 UTC by Alexander Kurtakov
Modified: 2018-04-19 17:43 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-04-17 15:51:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
file to open (1.40 KB, text/html)
2018-04-17 15:45 UTC, Alexander Kurtakov
no flags Details

Description Alexander Kurtakov 2018-04-17 15:45:43 UTC
Created attachment 1423110 [details]
file to open

When trying to open the attached html file epiphany only downloads it but doesn't open it.

Comment 1 Michael Catanzaro 2018-04-17 15:51:40 UTC
Same behavior as Chrome, closing

Comment 2 Alexander Kurtakov 2018-04-17 15:53:53 UTC
Firefox, opens it just fine. Would you please explain what is wrong with the file if I understand your action properly?

Comment 3 Michael Catanzaro 2018-04-17 16:09:30 UTC
Epiphany can open it too, it just doesn't open main resource downloads automatically. If you think that should be changed, we can consider it, but then we're just as likely to get reports from Chrome users complaining that it displayed the file instead of downloading it, right?

Comment 4 Alexander Kurtakov 2018-04-17 16:12:41 UTC
Can you point me how I can achieve that with webkitgtk? I ended up opening this bug as I was investigating SWT Browser (webkitgtk) issue and thought of trying epiphany and noticed the same happens.

Comment 5 Michael Catanzaro 2018-04-17 16:30:51 UTC
Hm, I'm not sure if it's possible. I would ask on webkit-gtk.org.

Comment 6 Andrey Loskutov 2018-04-19 08:18:05 UTC
I'm wondering why webkit tries to *download* this *local* file *many times* and still doesn't show anything:

####################
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>January 2, 2014</p>
<h3>License</h3>

</body>
</html>
####################

but this file is properly shown without a single download dialog:

####################
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>January 2, 2014</p>
<h3>License</h3>

</body>
</html>
####################

For me (a stupid browser user) this is just wrong. I can't imagine the behavior shown in the video below is expected and not a bug.

So please consider to reopen this one.

You can see (may be, if you are using the right browser) the (GIF) video here: https://bugs.eclipse.org/bugs/attachment.cgi?id=273681

Comment 7 Michael Catanzaro 2018-04-19 14:33:50 UTC
(In reply to Andrey Loskutov from comment #6)
> I'm wondering why webkit tries to *download* this *local* file *many times*
> and still doesn't show anything

Again, I don't know, but my guess is it will treat it as a download unless there's an .htm or .html extension. I don't really know. Since Chromium is doing the same thing, I doubt it's a bug.

Comment 8 Alexander Kurtakov 2018-04-19 15:36:02 UTC
(In reply to Michael Catanzaro from comment #7)
> (In reply to Andrey Loskutov from comment #6)
> > I'm wondering why webkit tries to *download* this *local* file *many times*
> > and still doesn't show anything
> 
> Again, I don't know, but my guess is it will treat it as a download unless
> there's an .htm or .html extension. I don't really know. Since Chromium is
> doing the same thing, I doubt it's a bug.

I think we have an misunderstanding. It happens also if you download the file locally, name it e.g. about about.html and try to open it by typing file//... in location field.

Comment 9 Michael Catanzaro 2018-04-19 16:12:55 UTC
(In reply to Alexander Kurtakov from comment #8)
> I think we have an misunderstanding. It happens also if you download the
> file locally, name it e.g. about about.html and try to open it by typing
> file//... in location field.

I saved this content as about.html:

####################
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>January 2, 2014</p>
<h3>License</h3>

</body>
</html>
####################

Then placed it in my Downloads folder so it can be accessed by Epiphany Tech Preview.

Then loaded in the address bar: file:///home/mcatanzaro/Downloads/about.html. It was displayed in the browser tab.

Comment 10 Lev Ufimtsev 2018-04-19 17:43:07 UTC
(In reply to Michael Catanzaro from comment #9)
> (In reply to Alexander Kurtakov from comment #8)
> > I think we have an misunderstanding. It happens also if you download the
> > file locally, name it e.g. about about.html and try to open it by typing
> > file//... in location field.
> 
> I saved this content as about.html:
> 
> ####################
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>About</title>
> </head>
> <body lang="EN-US">
> <h2>About This Content</h2>
> 
> <p>January 2, 2014</p>
> <h3>License</h3>
> 
> </body>
> </html>
> ####################
> 
> Then placed it in my Downloads folder so it can be accessed by Epiphany Tech
> Preview.
> 
> Then loaded in the address bar:
> file:///home/mcatanzaro/Downloads/about.html. It was displayed in the
> browser tab.

+1. Fedora 27, webkit2 via webkitgk2.18.
Tested with Epihany also, it loads as webpage.

@Andrey, maybe the mime types are broken on your system and test/html is not being recognized by your system properly.
Btw, what happens if you change your default system browser to something else?


Note You need to log in before you can comment on or make changes to this bug.