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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17959 in the body.
You can then email your comments to 17959 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Sun, 06 Jul 2014 19:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 06 Jul 2014 19:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: eww: FTP is not supported; but with ftp_proxy, it is 
Date: Sun, 06 Jul 2014 19:15:46 +0000
Package:  emacs
Severity: wishlist

	As of 36634f669f2c, eww unconditionally disallows browsing ftp:
	scheme URIs.  Arguably, it should only do so when no proxy
	setting is in effect for the URI in question.

	For instance, with ("ftp" . "MYPROXY:PORT") in
	url-proxy-services (and user-error commented out in eww.el)
	M-x eww shows FTP sites perfectly fine.  Consider, e. g.:

M-x eww RET ftp://ladsftp.nascom.nasa.gov/

You are user #109 of 800 simultaneous users allowed.

…
[DIR]
subsets. . . . . . . . . . . . . Dec 31  1969
────────────────────────────────────────────────────────────────────────
Generated Sun, 06 Jul 2014 19:12:54 GMT by MYPROXY
(squid/3.1.6)

-- 
FSF associate member #7257	http://boycottsystemd.org/

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Tue, 04 Nov 2014 16:41:01 GMT) Full text and rfc822 format available.

Message #8 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 17959 <at> debbugs.gnu.org
Subject: Re: bug#17959: eww: FTP is not supported; but with ftp_proxy, it is
Date: Tue, 04 Nov 2014 11:40:41 -0500
On Sun, 06 Jul 2014 19:15:46 +0000 Ivan Shmakov <ivan <at> siamics.net> wrote: 

IS> Package:  emacs
IS> Severity: wishlist

IS> 	As of 36634f669f2c, eww unconditionally disallows browsing ftp:
IS> 	scheme URIs.  Arguably, it should only do so when no proxy
IS> 	setting is in effect for the URI in question.

IS> 	For instance, with ("ftp" . "MYPROXY:PORT") in
IS> 	url-proxy-services (and user-error commented out in eww.el)
IS> 	M-x eww shows FTP sites perfectly fine.  Consider, e. g.:

IS> M-x eww RET ftp://ladsftp.nascom.nasa.gov/

IS> You are user #109 of 800 simultaneous users allowed.

What would be the upside of simply allowing browsing ftp: scheme?

If it only works with the proxy services you note, it seems like a
pretty rare use case.

Ted




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Mon, 10 Nov 2014 21:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 17959 <at> debbugs.gnu.org
Subject: Re: bug#17959: eww: FTP is not supported; but with ftp_proxy, it is
Date: Mon, 10 Nov 2014 22:20:39 +0100
Ivan Shmakov <ivan <at> siamics.net> writes:

> Package:  emacs
> Severity: wishlist
>
> 	As of 36634f669f2c, eww unconditionally disallows browsing ftp:
> 	scheme URIs.  Arguably, it should only do so when no proxy
> 	setting is in effect for the URI in question.
>
> 	For instance, with ("ftp" . "MYPROXY:PORT") in
> 	url-proxy-services (and user-error commented out in eww.el)
> 	M-x eww shows FTP sites perfectly fine.  Consider, e. g.:
>
> M-x eww RET ftp://ladsftp.nascom.nasa.gov/

Is there any point in using eww for ftp?  It seems like a duplication of
functionality.  The Emacs ftp browser is fine, I think.

So I'm closing this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 10 Nov 2014 21:22:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 17959 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 10 Nov 2014 21:22:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Wed, 19 Nov 2014 08:06:01 GMT) Full text and rfc822 format available.

Message #18 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 17959 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
Subject: Re: bug#17959: eww: FTP is not supported; but with ftp_proxy, it is
Date: Wed, 19 Nov 2014 08:04:49 +0000
reopen 17959
thanks

>>>>> Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

 >> Package: emacs Severity: wishlist

 >> As of 36634f669f2c, eww unconditionally disallows browsing ftp:
 >> scheme URIs.  Arguably, it should only do so when no proxy setting
 >> is in effect for the URI in question.

 >> For instance, with ("ftp" . "MYPROXY:PORT") in url-proxy-services
 >> (and user-error commented out in eww.el) M-x eww shows FTP sites
 >> perfectly fine.  Consider, e. g.:

 >> M-x eww RET ftp://ladsftp.nascom.nasa.gov/

 > Is there any point in using eww for ftp?  It seems like a duplication
 > of functionality.  The Emacs ftp browser is fine, I think.

	… Except that it doesn’t support using an HTTP proxy to access
	FTP servers, either, and I’ve seen networks where it’s the only
	option.  (Due to firewall settings, NAT, etc.)

	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.

	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?)

 > So I'm closing this.

	I have no objections to classifying this as ‘wontfix’, but I’d
	rather keep this opened for the issue to remain visible to the
	community.  (FWIW, http://debbugs.gnu.org/ hides closed issues
	by default.)

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Nov 2014 08:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Wed, 19 Nov 2014 17:25:02 GMT) Full text and rfc822 format available.

Message #23 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 17959 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
Subject: Re: bug#17959: eww: FTP is not supported; but with ftp_proxy, it is
Date: Wed, 19 Nov 2014 18:24:35 +0100
Ivan Shmakov <ivan <at> siamics.net> writes:

>  > So I'm closing this.
>
> 	I have no objections to classifying this as ‘wontfix’, but I’d
> 	rather keep this opened for the issue to remain visible to the
> 	community.  (FWIW, http://debbugs.gnu.org/ hides closed issues
> 	by default.)

That's the point of closing bugs reports -- so that other maintainers
don't have to bother with them.  Closing again.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 17959 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 19 Nov 2014 17:25:08 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Tue, 16 Dec 2014 20:10:02 GMT) Full text and rfc822 format available.

Message #28 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 17959 <at> debbugs.gnu.org
Subject: Re: 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))

Added tag(s) patch. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Tue, 16 Dec 2014 23:11:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Mon, 12 Jan 2015 21:41:03 GMT) Full text and rfc822 format available.

Message #33 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 17959 <at> debbugs.gnu.org
Subject: Re: bug#17959: support accessing FTP services via HTTP proxies 
Date: Mon, 12 Jan 2015 21:40:12 +0000
	Alternatively, one may question of why the guard was necessary
	in the code in the first place?

	Scanning through the url*.el code, I’ve found that there’re
	certain differences in handling URIs.  Namely, while some URI
	scheme handlers (like http:) retrieve a document when a URI is
	referenced, others (like irc:) instead call some “third-party”
	code, and there’s also a group (news:, file:, ftp:) of handlers
	which follow either of these ways depending on specific
	conditions.

	And in the case of FTP, – the condition upon which no document
	is retrieved is: the URI in question refers to a directory.

	The differences are due to the fact that while some URIs (say,
	news:877fxricgb.fsf_-_ <at> violet.siamics.net or
	http://example.com/) refer to certain /documents,/ there’re also
	URIs which are unlikely to ever denote anything like that (think
	of, say, geo:20,15.)

	Thus, my suggestion would be to:

	• allow the caller of the url*.el facilities to explicitly state
	  whether it’s interested in a document to be returned, in some
	  code to be called, or either;

	• in the ‘url-file’ function, – return a document of some form
	  (possibly the unprocessed output of the respective FTP
	  command) when given a URI which refers to a directory, – if so
	  is the preference of the caller;

	• (not directly related to this bug) adjust ‘url-news’ (and
	  possibly others) behavior similarly, perhaps going as far as
	  allowing the caller to specify its preferences regarding the
	  representation for such a document, – in the spirit of the
	  HTTP Accept: header.

	I guess all of the above warrant separate bug reports, which I
	hope to file shortly.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17959; Package emacs. (Mon, 09 Feb 2015 17:05:02 GMT) Full text and rfc822 format available.

Message #36 received at 17959 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 17959 <at> debbugs.gnu.org
Subject: Re: bug#17959: support accessing FTP services via HTTP proxies 
Date: Mon, 09 Feb 2015 17:04:26 +0000
>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

[…]

 > Thus, my suggestion would be to:

 > • allow the caller of the url*.el facilities to explicitly state
 > whether it’s interested in a document to be returned, in some code to
 > be called, or either;

[…]

 > I guess all of the above warrant separate bug reports, which I
 > hope to file shortly.

	Filed #19822 for the first point.  Once it’s decided how to fix
	that (and if), changes for url-file, url-irc, url-news, etc.,
	wouldn’t be all that a big deal.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Mar 2015 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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