<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>267345</bug_id>
          
          <creation_ts>2011-02-28 23:16:21 +0000</creation_ts>
          <short_desc>Konqueror does not recognize remote files from extension</short_desc>
          <delta_ts>2011-08-08 17:52:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>general</component>
          <version>0.0.1</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anders Lund">anderslund</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>adawit</cc>
    
    <cc>gassauer</cc>
    
    <cc>lueck</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin>4.6.5</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1092229</commentid>
    <comment_count>0</comment_count>
    <who name="Anders Lund">anderslund</who>
    <bug_when>2011-02-28 23:16:21 +0000</bug_when>
    <thetext>Version:           0.0.1 (using KDE 4.6.0) 
OS:                Linux

When clicking a link to a file, for example a pdf or tgz file, konqueror does not know what to do with it without http content-type headers. So it asks what to do, without suggesting the default app for the mimetype.

I think konqueror should use the local mimetype system, trying the filename and potentially even downloading a bit of the file for testing instead.

Examples: Everytime I download a tarball from aur.archlinux.com, I have to type in &quot;ark&quot; in a dialog box, because of that, eventhoug the filename packagename.tgz should be recognizable.

Reproducible: Always

Steps to Reproduce:
Go to http://aur.archlinux.org and try downloading a tarball for any package

Actual Results:  
Konqueror does not know what to do, and asks my to select an application without suggestions

Expected Results:  
konqueror would suggest to open with ark, or just open with ark if I asked it to always do that

OS: Linux (i686) release 2.6.37-ARCH
Compiler: gcc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1121282</commentid>
    <comment_count>1</comment_count>
    <who name="Burkhard Lück">lueck</who>
    <bug_when>2011-05-20 15:41:08 +0000</bug_when>
    <thetext>I find only *.tar.gz or *.tar.bz2 files on http://aur.archlinux.org. When clicking a link to a file I get a dialog with Save as, Open with Ark, Open with and Cancel. 
That&apos;s what is configured in the file associations, so I can not reproduce with Kubuntu 10.10 (KDE 4.6.2)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1121312</commentid>
    <comment_count>2</comment_count>
    <who name="Anders Lund">anderslund</who>
    <bug_when>2011-05-20 17:42:28 +0000</bug_when>
    <thetext>I have the same issue with aur. They use some odd mimetype description maybe?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129192</commentid>
    <comment_count>3</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-06-09 09:57:29 +0000</bug_when>
    <thetext>Another stupid server bug (and I am an ArchLinux user). It sends mime-type of &quot;application/x-xz&quot; instead of &quot;application/x-xz-compressed-tar&quot;. If it sent the latter it would work correctly. I guess we have to workaround broken servers as usual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129195</commentid>
    <comment_count>4</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-06-09 10:03:03 +0000</bug_when>
    <thetext>Git commit 3332be75106b7d555e7a44a24875b0b5085821f1 by Dawit Alemayehu.
Committed on 09/06/2011 at 09:57.
Pushed by adawit into branch &apos;KDE/4.6&apos;.

Workaround yet another broken server that sends the incorrect mime-type information.

This time it is the ArchLinux servers sending application/x-xz instead of
application/x-xz-compressed-tar when downloading packages.

BUG: 267345
FIXED-IN: 4.6.5

M  +9    -0    kioslave/http/http.cpp     

http://commits.kde.org/kdelibs/3332be75106b7d555e7a44a24875b0b5085821f1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129196</commentid>
    <comment_count>5</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-06-09 10:03:36 +0000</bug_when>
    <thetext>Git commit bf3064cb42f51370f343a61041ac28f7cf81e3d7 by Dawit Alemayehu.
Committed on 09/06/2011 at 09:57.
Pushed by adawit into branch &apos;master&apos;.

Workaround yet another broken server that sends the incorrect mime-type information.

This time it is the ArchLinux servers sending application/x-xz instead of
application/x-xz-compressed-tar when downloading packages.

BUG: 267345
FIXED-IN: 4.6.5

(cherry picked from commit 3332be75106b7d555e7a44a24875b0b5085821f1)

M  +9    -0    kioslave/http/http.cpp     

http://commits.kde.org/kdelibs/bf3064cb42f51370f343a61041ac28f7cf81e3d7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1150888</commentid>
    <comment_count>6</comment_count>
    <who name="Ferdinand Gassauer">gassauer</who>
    <bug_when>2011-08-07 09:43:43 +0000</bug_when>
    <thetext>please have a look at
http://code.google.com/p/wkhtmltopdf/issues/detail?id=9
at the end of the page &quot;committee.df&quot; does not recognize the filetype
 
using KDE 4.7 OpenSuSE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151132</commentid>
    <comment_count>7</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-08-07 18:12:51 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; please have a look at
&gt; http://code.google.com/p/wkhtmltopdf/issues/detail?id=9
&gt; at the end of the page &quot;committee.df&quot; does not recognize the filetype
&gt; 
&gt; using KDE 4.7 OpenSuSE

There is nothing we can do about this. It is the server&apos;s fault. Here is how the server responds to our request:

============ Sending Header:
GET /issues/attachment?aid=90032000&amp;name=committee.pdf&amp;token=ed08bbc57cc9b8bdd65216dec5292280 HTTP/1.1
Host: wkhtmltopdf.googlecode.com
Connection: Keep-Alive
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.7.40 Safari/534.34
Referer: http://code.google.com/p/wkhtmltopdf/issues/detail?id=9
Pragma: no-cache
Cache-control: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, x-gzip, x-deflate
Accept-Charset: utf-8,*;q=0.5
Accept-Language: en-US,en;q=0.9
Keep Alive: true

============ Received Status Response:
&quot;HTTP/1.1 200 OK
Cache-Control: max-age=31536000, public
Last-Modified: Sun, 07 Aug 2011 17:59:19 GMT
Expires: Mon, 06 Aug 2012 17:59:19 GMT
content-disposition: attachment; filename=&quot;committee.pdf&quot;
Content-Type: application/octet-stream
X-Content-Type-Options: nosniff
Date: Sun, 07 Aug 2011 17:59:19 GMT
Server: codesite
Content-Length: 414243
X-XSS-Protection: 1; mode=block

We cannot use the extension based workaround because the actual file name is sent through the content-disposition header.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151298</commentid>
    <comment_count>8</comment_count>
    <who name="Ferdinand Gassauer">gassauer</who>
    <bug_when>2011-08-08 07:33:46 +0000</bug_when>
    <thetext>@Dawit
thanks for looking into this
FYI - Firefox and Chrome propose the default app of the platform to open the file. So where is the magic?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151458</commentid>
    <comment_count>9</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-08-08 13:56:40 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; @Dawit
&gt; thanks for looking into this
&gt; FYI - Firefox and Chrome propose the default app of the platform to open the
&gt; file. So where is the magic?

I guess the fix for this is at the brower engine level, i.e. kdewebkit and khtml. They need to consider the filename sent through the content-disposition header before poping up the open with dialog. 

Can you please do me a favor and open a new ticket against kdelibs/general for that specific issue ? We should not mix up different issues even when they seem related. That way it will be easier when searching for duplicates.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151526</commentid>
    <comment_count>10</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-08-08 17:39:02 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; @Dawit
&gt; thanks for looking into this
&gt; FYI - Firefox and Chrome propose the default app of the platform to open the
&gt; file. So where is the magic?

@Ferdinand
Please assign the ticket directly to me adawit at kde dot org. I already have a fix for this issue. :) Also open it against &quot;Product: kdelibs&quot; and &quot;Component: kparts&quot;. 
Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151533</commentid>
    <comment_count>11</comment_count>
    <who name="Ferdinand Gassauer">gassauer</who>
    <bug_when>2011-08-08 17:52:02 +0000</bug_when>
    <thetext>new bug is here
https://bugs.kde.org/show_bug.cgi?id=279675</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>