GNU bug report logs - #17959
eww: FTP is not supported; but with ftp_proxy, it is

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Sun, 6 Jul 2014 19:16:02 UTC

Severity: wishlist

Tags: patch, wontfix

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ivan Shmakov <ivan <at> siamics.net>
To: 17959 <at> debbugs.gnu.org
Subject: bug#17959: support accessing FTP services via HTTP proxies 
Date: Tue, 16 Dec 2014 20:09:24 +0000
[Message part 1 (text/plain, inline)]
>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

[…]

 > Given that the only thing that EWW has to do to support ftp_proxy is
 > to ensure the user configuration specifies an HTTP proxy to use for
 > the target ftp: URI, it just seems like to simple a feature to omit
 > it.

	The patch MIMEd seems to resolve the issue.

 > When no HTTP proxy is specified for the URI, EWW should indeed
 > somehow invoke the Emacs native FTP client instead.

 > I guess the same approach may be applied to the other URI schemes
 > just as well (gopher:, perhaps?)

	FTR, – I’ve tried to access [1] via Squid, and it just worked.

[1] gopher://gopher.docfile.org/1/world/monitoring/uptime

[…]

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/net/eww.el	2014-12-09 03:21:57 +0000
+++ b/lisp/net/eww.el	2014-12-16 19:59:32 +0000
@@ -252,8 +238,15 @@
   (setq url (string-trim url))
   (cond ((string-match-p "\\`file:/" url))
 	;; Don't mangle file: URLs at all.
-        ((string-match-p "\\`ftp://" url)
-         (user-error "FTP is not supported."))
+	((let* ((parsed (url-generic-parse-url url))
+		(loader (url-scheme-get-property (url-type parsed) 'loader))
+		(proxy  (and (url-host parsed)
+			     (url-find-proxy-for-url
+			      parsed (url-host parsed)))))
+	   (and (eq 'url-ftp loader)
+		(or (not proxy)
+		    (not (string-match-p "^https?://" proxy)))))
+	 (user-error "Direct FTP is not supported."))
         (t
          (if (and (= (length (split-string url)) 1)
 		  (or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url))

This bug report was last modified 10 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.