Package: hpodder
Version: 1.1.5.0+nmu2
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


hpodder fails to download mp3 file from the following url (error 404):

http://www.tor.com//images/stories/stories/Gilman/Lightbringers_and_Rainmakers/Gilman,
 Felix - Lightbringers and Rainmakers.mp3

( the podcast feed is http://www.tor.com/rss/category/TorDotStories )

The mp3 file exists, but the download fails because the url is passed unescaped 
to curl.
I've attached a patch that fixes the problem at my end.

Cheers,
Avi



- -- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hpodder depends on:
ii  curl                      7.21.0-1       Get a file from an HTTP, HTTPS or 
ii  id3v2                     0.1.12-2       A command line id3v2 tag editor
ii  libc6                     2.11.2-7       Embedded GNU C Library: Shared lib
ii  libffi5                   3.0.9-3        Foreign Function Interface library
ii  libgmp3c2                 2:4.3.2+dfsg-1 Multiprecision arithmetic library
ii  libsqlite3-0              3.7.3-1        SQLite 3 shared library

hpodder recommends no packages.

hpodder suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkzuzBkACgkQwK8SobAxNVlPTwCfUaIYfG8OUaDHML1q8SqN3Mls
fdkAoM+8tFC9raNHbJARh/2yyaQq6OqC
=dzsn
-----END PGP SIGNATURE-----
Index: hpodder-1.1.5.0+nmu2/Download.hs
===================================================================
--- hpodder-1.1.5.0+nmu2.orig/Download.hs	2010-11-25 22:03:28.000000000 +0200
+++ hpodder-1.1.5.0+nmu2/Download.hs	2010-11-25 22:17:47.000000000 +0200
@@ -44,6 +44,7 @@
 import System.Posix.IO
 import Data.Hash.MD5
 import Control.Exception(evaluate)
+import Network.URI(escapeURIString,isUnescapedInURI)
 
 data Result = Success | Failure
             deriving (Eq, Show, Read)
@@ -98,7 +99,7 @@
                 (defaultFileFlags {trunc = True})
        msgfd2 <- dup msgfd
        pid <- pOpen3Raw Nothing (Just msgfd) (Just msgfd2) 
-                 curl (curlopts ++ curlrcopts ++ [url, "-o", fp])
+                 curl (curlopts ++ curlrcopts ++ [(escapeURIString isUnescapedInURI url), "-o", fp])
                  (return ())
        closeFd msgfd
        closeFd msgfd2

Reply via email to