From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#17959: support accessing FTP services via HTTP proxies Date: Mon, 12 Jan 2015 21:40:12 +0000 Message-ID: <87fvbfy8xv.fsf@violet.siamics.net> References: <87mwcmb8nx.fsf@violet.siamics.net> <87r3wz7h0e.fsf@violet.siamics.net> <877fxricgb.fsf_-_@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1421098880 32719 80.91.229.3 (12 Jan 2015 21:41:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2015 21:41:20 +0000 (UTC) To: 17959@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 12 22:41:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YAmjZ-0001Yo-OM for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Jan 2015 22:41:13 +0100 Original-Received: from localhost ([::1]:36392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAmjZ-0006Sz-2o for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Jan 2015 16:41:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAmjU-0006Sr-RQ for bug-gnu-emacs@gnu.org; Mon, 12 Jan 2015 16:41:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAmjR-0004lJ-Ig for bug-gnu-emacs@gnu.org; Mon, 12 Jan 2015 16:41:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAmjQ-0004l7-4G for bug-gnu-emacs@gnu.org; Mon, 12 Jan 2015 16:41:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YAmjP-0008Cj-Be for bug-gnu-emacs@gnu.org; Mon, 12 Jan 2015 16:41:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Jan 2015 21:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch wontfix Original-Received: via spool by 17959-submit@debbugs.gnu.org id=B17959.142109883331495 (code B ref 17959); Mon, 12 Jan 2015 21:41:03 +0000 Original-Received: (at 17959) by debbugs.gnu.org; 12 Jan 2015 21:40:33 +0000 Original-Received: from localhost ([127.0.0.1]:54783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YAmiu-0008Bt-LB for submit@debbugs.gnu.org; Mon, 12 Jan 2015 16:40:33 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:49084) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YAmio-0008Bf-2H for 17959@debbugs.gnu.org; Mon, 12 Jan 2015 16:40:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=HiqXl/Fb95ONNVLb2idRen0CoTExFLp/Gabiqafz6PI=; b=Hdf3B59EC3FJI21msOF+HjmulobjKMKJQsM4iTEJ0kLGY1FIBERvKtNb5U4f3G5Cj4dw1fYWod5KVmhJNK3zYKtQYI1YxoPbM0dVmJMqaJqv5Z2hoJW+u8vW7shdWwtquK7tE8dM7j/ZEOoOWPC8DiArVSRA97QTJ4F7m+nOg4M=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YAmii-000579-KK for 17959@debbugs.gnu.org; Mon, 12 Jan 2015 21:40:21 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YAmib-00019h-BK for 17959@debbugs.gnu.org; Tue, 13 Jan 2015 04:40:13 +0700 Mail-Followup-To: 17959@debbugs.gnu.org In-Reply-To: <877fxricgb.fsf_-_@violet.siamics.net> (Ivan Shmakov's message of "Tue, 16 Dec 2014 20:09:24 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98277 Archived-At: Alternatively, one may question of why the guard was necessary in the code in the first place? Scanning through the url*.el code, I=E2=80=99ve found that there=E2=80=99re 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 =E2=80=9Cthird-party=E2= =80=9D code, and there=E2=80=99s also a group (news:, file:, ftp:) of handlers which follow either of these ways depending on specific conditions. And in the case of FTP, =E2=80=93 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_-_@violet.siamics.net or http://example.com/) refer to certain /documents,/ there=E2=80=99re also URIs which are unlikely to ever denote anything like that (think of, say, geo:20,15.) Thus, my suggestion would be to: =E2=80=A2 allow the caller of the url*.el facilities to explicitly state whether it=E2=80=99s interested in a document to be returned, in some code to be called, or either; =E2=80=A2 in the =E2=80=98url-file=E2=80=99 function, =E2=80=93 return a d= ocument of some form (possibly the unprocessed output of the respective FTP command) when given a URI which refers to a directory, =E2=80=93 if so is the preference of the caller; =E2=80=A2 (not directly related to this bug) adjust =E2=80=98url-news=E2= =80=99 (and possibly others) behavior similarly, perhaps going as far as allowing the caller to specify its preferences regarding the representation for such a document, =E2=80=93 in the spirit of the HTTP Accept: header. I guess all of the above warrant separate bug reports, which I hope to file shortly. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A