(this is a copy from my post on Stack overflow I am hoping someone in the ubuntu community can shed some light on the situation for me) Okay so I have a bit of a weird problem going on that I'm not entirely sure how to explain... Basically I am trying to decode a bencode file (.torrent file) now I have tried 4 or 5 different scripts I have found via google and S.O. with no luck (get returns like this in not a dictionary or output error from same )
Now I am downloading the .torrent file like so
wget http://link_to.torrent file
//and have also tried with curl like so
curl -C - -O http://link_to.torrent
and am concluding that there is something happening to the file when I download in this way. The reason for this is I found this site which will decode a .torrent file you upload online to display the info contained in the file. However when I download a .torrent file by not just clicking on the link through a browser but instead using one of the methods described above it does not work either. So Has anyone experienced a similar problem using one of these methods and found a solution to the problem or even explain why this is happening ? As I can;t find much online about it nor know of a workaround that I can use for my server
Update: Okay as was suggested by @coder543 to compare the file size of download through browser vs. wget. They are not the same size using wget style results in a smaller filesize so clearly the problem is with wget & curl not the something else .. idea's?
for one specific LInk
wget methood -> 7281 Bytes
curl method -> 7281 Bytes
download-> 7317 Bytes
also note curl and wget seem to be the same on atleast the 3 or 4 i have compared
(and this has been tested with multiple different .torrent links) again any help or idea's to move forward would be greatly appreciated! Even if anyone can reproduce the reults it would be appreciated! ... My server is 12.04 LTS on 64-bit architecture and the laptop I tried the actual download comparison on is the same
file
as the last arg there. But anyway, this may be the webserver sending you different data based on what User-Agent is set to in the request header.