From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Bug in url-retrieve-synchronously from url.el on redirect Date: Sat, 11 Jul 2020 01:49:49 +0700 Message-ID: References: <08fad79e-9b6b-6ff4-66fd-c32fdf5b7189@grinta.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6814"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Daniele Nicolodi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 10 20:51:03 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jty6v-0001eT-AP for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jul 2020 20:51:01 +0200 Original-Received: from localhost ([::1]:37578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jty6u-0003AG-C8 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jul 2020 14:51:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jty60-0002YZ-85 for emacs-devel@gnu.org; Fri, 10 Jul 2020 14:50:04 -0400 Original-Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]:45931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jty5y-0008TC-Kt for emacs-devel@gnu.org; Fri, 10 Jul 2020 14:50:03 -0400 Original-Received: by mail-ua1-x92d.google.com with SMTP id p6so2123035uaq.12 for ; Fri, 10 Jul 2020 11:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IGFgchPivmkQa4gYJrNRKYlpmoRt3+FgOydqbC6HYLU=; b=rs/i/SKIoA690rxR98Ib+ImxpVY+rVhRyFfaiy69W3bzkKdamhoVyX5AUx3NTwJGLD F5/htNpXXjY5Rfor1TLI6HGxUonlRPpNZnSZ0Gu8ZHmqGiyReqKg6YDQ5AuXxJ9dZdzt m7aZ5mq9NSeUpg5kbQ29BKbo8upw+g0HNIMrrE8yBrXAySz2rNm+MYN0eP/ayeMal1vL LZVecLqli1OBbttXAuK1Y1zjD5i4Erl+5luZ/XBe69cqoqrZuVjNfjRhqlF6YCGjLpLy 66cTwTEWN8cDnQq0r1WTNH7OPXRVdWDvZY689hg1dRv4W4f29OiO4zZWYbXgKVwq+Sct n/7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IGFgchPivmkQa4gYJrNRKYlpmoRt3+FgOydqbC6HYLU=; b=V3eAmIAsdl8q7z+mLBFqobajm6dQYC00GNpBSy8t2i03qNno/yUInTKLfgR/fE5gx7 gUu6jOOOUx90sBw4wfSkgNOdsEyaYIFQ41btd8UXuapHnPwuZJQLt3RntkEcdvUYOo5U t+8DDnhKuLL1JVWzVgJQJUmD7N3PJyIUY7YqkcysWGBqe04Kkj5cXW/GNJdqptB6ZLy6 Zp+cW02iClQlo4DbI1t906ifCBAoPsmprfBA0PweiC5U5k97UjiTx4b7VOHun5Lwud8w LbcVoW9tUuZaS4KnmlybQaWQdU3aJLl/0nPK/T5W8/mjwPwiqV31W12CvUi9+UF0XtGo 3KRQ== X-Gm-Message-State: AOAM5313ZOf3xO/YfCxs/B8JCPXE8b9U1u+QuMy5BkID/SYF+yFmQsFF o69PuVQfyoG4gDEzs7jW9uWuryBkx1b6fd7n8MYWVIHl X-Google-Smtp-Source: ABdhPJyJ4nJrygs4euhiDqv0UrPv1zL4Jo+q29zH5pkqPemJWYSXYDmRl7GcrkgsToo+rd0axKy7ZYrg9zUR9ZpkMgA= X-Received: by 2002:ab0:316:: with SMTP id 22mr52502627uat.41.1594407001058; Fri, 10 Jul 2020 11:50:01 -0700 (PDT) In-Reply-To: <08fad79e-9b6b-6ff4-66fd-c32fdf5b7189@grinta.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252833 Archived-At: On Sat, 11 Jul 2020 at 01:18, Daniele Nicolodi wrote: > url-retrieve-synchronously fails to obey redirect responses if the > returned "Location" header contains spaces: it redirects to the URL > truncated to the first space. It seems that spaces in the Location > header value are allowed (at least ngnix produces headers like that). They are not, and you should report it as a bug against nginx. It should be percent-encoding the space. It should also be percent-encoding any non-ASCII characters. The Location header is defined in RFC 7231, section 7.1.2, with a value of URI-reference as defined in RFC 3986. The complete BNF grammar is listed in Appendix A, and none of the productions there contain the raw space character, nor raw non-ASCII characters.