Have curl --follow the location of the things it fetches.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 29 Aug 2010 14:10:11 +0000 (16:10 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 29 Aug 2010 14:10:11 +0000 (16:10 +0200)
lisp/gnus-html.el

index f6cf00d..f4cf3a0 100644 (file)
         (process (start-process
                   "images" nil "curl"
                   "-s" "--create-dirs"
+                  "--location"
                   "-o" (gnus-html-image-id url)
                   url)))
     (set-process-sentinel process 'gnus-html-curl-sentinel)
           (buffer (getf (process-plist process) 'buffer))
           (spec (pop images))
           (file (gnus-html-image-id (car spec))))
-      (when (and (file-exists-p file)
-                (buffer-live-p buffer))
+      (when (buffer-live-p buffer)
        (save-excursion
          (set-buffer buffer)
          (let ((buffer-read-only nil))
       (apply 'start-process 
             "images" nil "curl"
             "-s" "--create-dirs"
+            "--location"
             urls))))
 
 ;;; gnus-html.el ends here