Bug 155276 - kget can't download file
Summary: kget can't download file
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-08 15:01 UTC by Luca Gambetta
Modified: 2008-03-09 19:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The download windows (42.05 KB, image/png)
2008-01-08 15:01 UTC, Luca Gambetta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Gambetta 2008-01-08 15:01:11 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC 4.2.2 
OS:                Linux

I'm on latest svn checkout from 4.0.0 branch.
If you go to mininova.org and try to download a torrent kget:
* shows the wrong name
* crashes

I'm not shure it's a real crash, but the application closes herself. When you restart kget you can find the file in the download queue and the download just starting, but nothing is downloaded (0 size file). Also the name of the file is wrong.
Try with this URL: http://www.mininova.org/get/1091449.
Attached you can see the download window.
This happens also on sites who uses a script to send the file: on another site I had to disable kget to downloand.
Comment 1 Luca Gambetta 2008-01-08 15:01:58 UTC
Created attachment 22899 [details]
The download windows
Comment 2 Lukas Appelhans 2008-01-08 17:02:43 UTC
Hi!
1. Do it opens the KCrash-Dialog, when yes, please post the backtrace....

2. The name of the file: it's wrong, cause Mininova is telling KGet the wrong name :( I hope/think we are able to rename a file in KDE 4.1, that would help us very much.

3. The torrent, when you click save as, the problem is that the file has not the ending .torrent, so it will not opened with the bt-plugin :(

4. when you click on it and then download with kget, there's a bad url, it seems that mininova is appending a white-space to every url, but I'm not sure...

I will work on these issues when I have a bit free time :)

Btw, you have enabled the torrent-plugin only for you, don't you? (it normally shouldn't be enabled in the 4.0-branch...)

Last: You can also test the plugin in the 4.1-trunk, which looks more nice and is hopefully much more stable :)

;)

Lukas

PS: Thx for the bugreport :)
Comment 3 Luca Gambetta 2008-01-08 18:35:38 UTC
Uhm... Lukas, maybe I got misunderstood (it's my poor english, sorry).
* I'm on KDE 4.0.?, updated to the latest branch snapshot (compiled this morning)
* I'm not using the BT plugin (i'd love to do it, sure!), I download the filem, then pass it to KTorrent 2.2.4
* No crash dialog opens: so I suppose it crashes because kget disappears from the systray (haven't tried to launch it in a Konsole, sorry)
* the wrong name appears also in Konqueror: on KDE 3.5 everything works flawlessy, on the same site, same file, same URL, so I think it's a problem of the kioslave who manages http urls
* wrong file names are provided every time I try to download a file generated with a script, those names are usually in the form: ="mycoolname.txt"
* it seems to me the same problem with downloads from the rapidshare site I reported some time ago
* I think that XXX (place the name of who take care of the URL) misbehave with the HTTP protocol: you (HTTP server, via a script or directly) can send some headers to tell you what are you downloading. Those headers contains the "on the client" name, the size, and so. I think kget (or who sends it the url to download) simply get confused confused: as you can see in the window there's the URL and the filename (gathered via HTTP headers). 

Keep the good work on! :D

Comment 4 Lukas Appelhans 2008-01-08 19:08:33 UTC
Hi Luca!

> * I'm not using the BT plugin (i'd love to do it, sure!), I download the >filem, then pass it to KTorrent 2.2.4 
Ahh ok

> * No crash dialog opens: so I suppose it crashes because kget disappears from >the systray (haven't tried to launch it in a Konsole, sorry) 
can you please do and post the last 50 lines or so?

> * the wrong name appears also in Konqueror: on KDE 3.5 everything works >flawlessy, on the same site, same file, same URL, so I think it's a problem of >the kioslave who manages http urls 
Perhaps...

> * wrong file names are provided every time I try to download a file generated >with a script, those names are usually in the form: ="mycoolname.txt" 

> * it seems to me the same problem with downloads from the rapidshare site I >reported some time ago 
Yeah, it seems so, but it should be fixed in newtransferdialog.cpp ----> set second Url should not be inserted...

> * I think that XXX (place the name of who take care of the URL) misbehave >with the HTTP protocol: you (HTTP server, via a script or directly) can send >some headers to tell you what are you downloading. Those headers contains >the "on the client" name, the size, and so. I think kget (or who sends it the >url to download) simply get confused confused: as you can see in the window >there's the URL and the filename (gathered via HTTP headers). 
Yeah pls try to download only the URL, and then test if the torrent is working :/

Thx

Lukas
Comment 5 Maksim Orlovich 2008-01-10 18:43:12 UTC
SVN commit 759470 by orlovich:

Parse content-disposition better; at the very least not including the =, ", and last ".
Also makes a likely ill-advised attempt to do it following the spec, which at least 
should make it more tolerant to LWS
BUG:153693
CCBUG:155276


 M  +82 -17    http.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=759470
Comment 6 Lukas Appelhans 2008-03-09 19:16:32 UTC
Fixed in KDE 4.1 trunk

Lukas