From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: url-encode-url: do not add a trailing slash for "bare" URLs (with no file/directory) Date: Thu, 13 Mar 2014 09:12:29 -0400 Message-ID: References: <87k3bzhg81.fsf@bzg.ath.cx> <87siqnzded.fsf@bzg.ath.cx> <87txb2msj8.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1394716398 18477 80.91.229.3 (13 Mar 2014 13:13:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2014 13:13:18 +0000 (UTC) Cc: emacs-devel@gnu.org, David Caldwell To: Bastien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 13 14:13:28 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WO5Rv-000221-4y for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2014 14:13:27 +0100 Original-Received: from localhost ([::1]:38836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO5Ru-00055U-MY for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2014 09:13:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO5RD-0004D2-Rr for emacs-devel@gnu.org; Thu, 13 Mar 2014 09:12:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO5R8-00021y-1p for emacs-devel@gnu.org; Thu, 13 Mar 2014 09:12:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO5R1-00020F-Ja; Thu, 13 Mar 2014 09:12:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kHIgCBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kHIgCBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51703855" Original-Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Mar 2014 09:12:30 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CFB526057F; Thu, 13 Mar 2014 09:12:29 -0400 (EDT) In-Reply-To: <87txb2msj8.fsf@bzg.ath.cx> (Bastien's message of "Thu, 13 Mar 2014 09:06:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:170312 Archived-At: > OKay, but the patch does not really change the output of > (url-encode-url "http://www.gnu.org#"), except the for trailing slash. But it changes the output of (url-encode-url "http://www.gnu.org/#foo"), doesn't it. And it changes it from one that works with curl to one that doesn't work with curl, right? > Admittedly, this is not a bug, but a small discrepancy that makes bare > URLs looks weird/ugly. I personally find http://www.gnu.org more weird than http://www.gnu.org/ > Stefan, let me know if you're fine with the patch and if I can commit > this in trunk or on some other branch. I think we're better off leaving this as it is, since the two forms are just as valid, and the current form seems to be marginally safer. Stefan