From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: url-encode-url: do not add a trailing slash for "bare" URLs (with no file/directory) Date: Wed, 12 Mar 2014 15:42:50 +0100 Message-ID: <87siqnzded.fsf@bzg.ath.cx> References: <87k3bzhg81.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1394635418 2896 80.91.229.3 (12 Mar 2014 14:43:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Mar 2014 14:43:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 12 15:43:48 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 1WNkNo-0005ui-9g for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2014 15:43:48 +0100 Original-Received: from localhost ([::1]:32860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNkNn-0005es-PL for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2014 10:43:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNkNf-0005VW-6o for emacs-devel@gnu.org; Wed, 12 Mar 2014 10:43:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNkNa-0007fO-36 for emacs-devel@gnu.org; Wed, 12 Mar 2014 10:43:39 -0400 Original-Received: from rs249.mailgun.us ([209.61.151.249]:49081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNkNZ-0007fA-Si for emacs-devel@gnu.org; Wed, 12 Mar 2014 10:43:34 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=kickhub.com; q=dns/txt; s=mailo; t=1394635390; h=From: To: Cc: Subject: In-Reply-To: References: Date: Message-Id: Mime-Version: Content-Type: Sender; bh=3Sy0UO1JiNOHFsrKsEkk9vrabgOEhrgAa3RZQe6ud9g=; b=n757Krpx6CJGzsGI9+MQcCZGrAwob2ENVFDCEoLnDopn2S5zS1lvKfWVL8YjbJ1xEbfwnDZ7 rZbGFOQONZJoieywIYdkWzSmtCUyCQ+ZHblMIFUuc7F92zvfPsVnTwx2tAoLDYVp1Slv1Abg UHylMHQsOBk9qMv2vgfDtU+852U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=kickhub.com; s=mailo; q=dns; h=From: To: Cc: Subject: In-Reply-To: References: Date: Message-Id: Mime-Version: Content-Type: Sender; b=G3EACbUQfzUzePj736e2/bjzgKkEc4PH1ovupxDGeN7Xh/3IMHCqgSbTz5YnuFfOH4fAU5 TxEyOGUng04EUUJ+FHFIYleZNOawRntTQjfukUUKXW4bBZnCMt+Z7cLevcVThuKpGl97vT8X YRWMtA0huyxwogRGwREr9Z/M/pz84= Original-Received: from bzg.localdomain (AMontsouris-651-1-244-140.w92-163.abo.wanadoo.fr [92.163.19.140]) by mxa.mailgun.org with ESMTP id 5320726b.628dae8-in3; Wed, 12 Mar 2014 14:42:51 -0000 (UTC) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id 17F461C214FB; Wed, 12 Mar 2014 15:42:50 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Wed, 12 Mar 2014 09:40:47 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Mailgun-Sid: WyIxNjA5MyIsICJlbWFjcy1kZXZlbEBnbnUub3JnIiwgIjE2NDg4Il0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.61.151.249 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:170296 Archived-At: Hi Stefan, Stefan Monnier writes: >> The following trivial patch changes this. > > I'm no expert on URL conventions, but it looks OK to me, tho maybe the / > is needed when there's a fragment. Do you mean when there is a #name like in "http://www.gnu.org/#" or "http://www.gnu.org/index.html#name" ? The patch does not the current behavior wrt fragments. (url-encode-url "http://www.gnu.org/#") => http://www.gnu.org/ in both cases. With the patch we have (url-encode-url "http://www.gnu.org#") => http://www.gnu.org instead of (url-encode-url "http://www.gnu.org#") => http://www.gnu.org/ (no trailing slash with the patch), but I don't think http://www.gnu.org# is correct anyway. Let me know, -- Bastien