From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alain Picard Newsgroups: gmane.emacs.bugs Subject: bug#24490: 25.1; restclient no longer sends auth header upon redirect Date: Thu, 22 Sep 2016 10:01:50 +1000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c07dc9263f327053d0d5ec2 X-Trace: blaine.gmane.org 1474502548 10046 195.159.176.226 (22 Sep 2016 00:02:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Sep 2016 00:02:28 +0000 (UTC) Cc: 24490@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 22 02:02:24 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmrT1-0001bC-60 for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Sep 2016 02:02:19 +0200 Original-Received: from localhost ([::1]:37658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmrSz-0007o5-Dk for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Sep 2016 20:02:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmrSp-0007ly-G0 for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 20:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmrSl-0003yQ-Au for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 20:02:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmrSl-0003xZ-7W for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 20:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bmrSk-0003Cy-Fj for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2016 20:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alain Picard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Sep 2016 00:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24490-submit@debbugs.gnu.org id=B24490.147450251812322 (code B ref 24490); Thu, 22 Sep 2016 00:02:02 +0000 Original-Received: (at 24490) by debbugs.gnu.org; 22 Sep 2016 00:01:58 +0000 Original-Received: from localhost ([127.0.0.1]:60053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmrSg-0003Cg-0a for submit@debbugs.gnu.org; Wed, 21 Sep 2016 20:01:58 -0400 Original-Received: from mail-vk0-f49.google.com ([209.85.213.49]:33180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmrSe-0003CT-JH for 24490@debbugs.gnu.org; Wed, 21 Sep 2016 20:01:57 -0400 Original-Received: by mail-vk0-f49.google.com with SMTP id 192so4213401vkl.0 for <24490@debbugs.gnu.org>; Wed, 21 Sep 2016 17:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gocatch-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=o/ZsNWnXAV+m0XZdQ2VhxV/wk+lhEmzN85ZtZaaSpKQ=; b=vQulpJyE+8FjBx7cQq38BnTc2qaEYGANT7LLq/p34CnLzVPnHpsQWxq1RmRm6Xd3ri hR6hm/yftKC0ZDpoiFKCMFHaYcqo13TYlzsSJngqPvBKA/dx1yTd++0AAY0nS+wV7ZBy L/hZVCjAGoo+iyn+diS3u+6HpZ5OXVBR22QvKMYD4L+F98V5T3EMwJ+1N6nNMf9jm3zb jhRAxyZOzAcIn0v7uyGtHyMSbBTsDmo4C4v5qvNW1rNoDkdjpA7/46nbJfc/KbKR9AdG 9VI1mCeCR64TuNc6bL2SRoFEZ0HEhOh2a8UoaqeVAF+hXuuRqXe+YgU1fztJOrb0NqIl rM3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=o/ZsNWnXAV+m0XZdQ2VhxV/wk+lhEmzN85ZtZaaSpKQ=; b=mGD7mLBYJ+fFqrNaoG0xEbipTwtO6kTkd0vNM/QxO2YDRh2xdwkV5roiyCvajC21yV L5OXNPg4UVdPLzbad/JFOQq7QomcG1OB76T/Vl3slQUZHQjo3lnw9E4aHC63ozQRfJf9 irPw4x4P7WnE6AnBdT9v3jnfUEaMrwLRM1bEwRHZCAFUllimSvBUkvuftlUEVP2alzGa NQGwKgRoqeBXJ7NFtvMZw88pkLjp1RFP9JLUNwbgEr+vzCmqFXK7awlpWeQJxNt+JIEA Q7bKqS2kOneWBFxIGJqqiJm3dDSllZmM0aeswEX0dpYQG3HQQf5U6FfXUFYcFWWuLE5L f65g== X-Gm-Message-State: AE9vXwNFYBqmeGPffBBNV+/Du0pBPTTofhQQICh/wHFfq+tEQ6Vb/Xb1fF1523RtNboJGnDj7EAswPPmh6jauwBm4asLKEIjpVuxhDKm6CekAK6w4IXprPbb/y8lLoAiSdHQrvE6q+MMQ+uIUyY= X-Received: by 10.31.221.67 with SMTP id u64mr520769vkg.45.1474502511025; Wed, 21 Sep 2016 17:01:51 -0700 (PDT) Original-Received: by 10.103.122.150 with HTTP; Wed, 21 Sep 2016 17:01:50 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:123539 Archived-At: --94eb2c07dc9263f327053d0d5ec2 Content-Type: text/plain; charset=UTF-8 Well, curl gives you back the 303 (See Other) with the Location header, unless you add -L (follow redirection) in which case it reposts any original header (including Authorization) to the new location. i.e. "it just works". What would be nice for restclient is a separate keystroke which either does or does not follow the redirection; sometimes you want to debug the initial hop. But the default should be to do what it does now, which is to follow; i.e. "act like a browser". Hope this helps. Alain On 21 September 2016 at 18:15, Andreas Schwab wrote: > On Sep 21 2016, Alain Picard wrote: > > > Problem: I am using restclient.el, and hitting a server which > > issues a redirect, and I receive a 400 Forbidden response because > > the redirected call does not receive the authentication header > > (I can see this from the log of my server). > > How does curl or wget handle this? > > Andreas. > > -- > Andreas Schwab, SUSE Labs, schwab@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." > -- --94eb2c07dc9263f327053d0d5ec2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Well, curl gives you back the 303 (See Other) with
the Locati= on header, unless you add -L (follow redirection)
in which case it reposts= any original header (including Authorization) to the new location. =C2=A0i= .e. "it just works".

What would be nice for restclient is = a separate keystroke
which either does or does not follow the redirection;= sometimes
you want to debug the initial hop.=C2=A0 But the default should= be
to do what it does now, which is to follow; i.e. "act like a brow= ser".

Hope this helps.

=C2=A0 Alain

On 21 September 2016 at 1= 8:15, Andreas Schwab <schwab@suse.de> wrote:
On Sep 21 2016, Alain Picard <alain@gocatch.com> wrote:

> Problem: I am using restclient.el, and hitting a server which
> issues a redirect, and I receive a 400 Forbidden response because
> the redirected call does not receive the authentication header
> (I can see this from the log of my server).

How does curl or wget handle this?

Andreas.

--
Andreas Schwab, SUSE Labs, schwab@suse.de=
GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE=C2=A0 1748 E4D4 88E3 0EEA = B9D7
"And now for something completely different."


=C2=A0
--94eb2c07dc9263f327053d0d5ec2--