From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Visher 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 10:05:52 -0400 Message-ID: References: <87k3bzhg81.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1394633192 2685 80.91.229.3 (12 Mar 2014 14:06:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Mar 2014 14:06:32 +0000 (UTC) Cc: Bastien , Emacs Development List To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 12 15:06:43 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 1WNjnu-0005WS-EY for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2014 15:06:42 +0100 Original-Received: from localhost ([::1]:60819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjnt-0005Dv-RI for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2014 10:06:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjno-0005Dj-1V for emacs-devel@gnu.org; Wed, 12 Mar 2014 10:06:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNjnn-0002Gm-2t for emacs-devel@gnu.org; Wed, 12 Mar 2014 10:06:35 -0400 Original-Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:40484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjnl-0002GI-FX; Wed, 12 Mar 2014 10:06:33 -0400 Original-Received: by mail-qc0-f180.google.com with SMTP id x3so11278366qcv.39 for ; Wed, 12 Mar 2014 07:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=B9SdB5znj4IOQBlI3ZQ143mJtjsixTJj6sZdLrZDkKo=; b=tTKbjHwIeawQDp58L0SwkaF/X6tFv+jlIY2v2x01k+W6XEt+CidJrBjqI95wnkTZGb Qus6DlGg2SDvFeBlrV79e6KdoiRLKfSiKPn++RikhSoITDKojHii2AH2ROsmMbfDpQYj PzAjOogqFNCuCsP+aAWiWDQ3po4/QUpgw8Yo1WuqNvFYsAbVxV/b8gF7l0NgY4CAo9zv F8ayx2mCRki7ePpUbBEmd/CvYcOmSC5Rdgxzbwxb/47WzAqULOsmfZ5AsXSAfZCbKD6Z VNmlpzan+zhSKnGENn4reaWc9sFXq4DpTmvQMrQBtGRnjSiYyqcik7kY1HWomZL9nvjz MMFQ== X-Received: by 10.140.102.2 with SMTP id v2mr17755994qge.27.1394633192797; Wed, 12 Mar 2014 07:06:32 -0700 (PDT) Original-Received: by 10.140.87.172 with HTTP; Wed, 12 Mar 2014 07:05:52 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::234 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:170295 Archived-At: Hi Bastien and Stefan, On Wed, Mar 12, 2014 at 9:40 AM, Stefan Monnier wrote: >> 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. I'd agree with you here, in that the enclosed patch probably wouldn't work as expected in the case of a fragment being present. I'd agree with Bastien in that it's never the right thing to default to a directory, especially since most servers these days will automatically redirect you to the directory if one is present with the same name as the 'file' you requested. -- In Christ, Timmy V. http://blog.twonegatives.com/ http://five.sentenc.es/ -- Spend less time on mail