all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Savonichev <andrew.savonichev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: `url-retrieve' for https behind proxy: 400 bad request
Date: Tue, 8 Nov 2016 09:18:07 +0300	[thread overview]
Message-ID: <CAL53kkLaUYceGsH-23-4h9MhWjjhoBZ8iYBRY1o=jkfUB1jnsQ@mail.gmail.com> (raw)

Hi,

I use GNU/Emacs behind the http proxy with no user authorization, and
seems `url-retrieve' does not work correctly with the proxy-server -
error "400 Bad Request" for any https url.

Environment variables (http_proxy and https_proxy) are correctly set
and other tools except the emacs work fine: tried curl and wget.

I've compared url-retrieve and curl requests to the proxy-server
and there is a difference:
curl does CONNECT followed by GET, while url-retrieve use a direct
GET request.

curl (works fine):
  CONNECT www.google.com:443 HTTP/1.1
  Host: www.google.com:443
  User-Agent: curl/7.29.0
  Proxy-Connection: Keep-Alive

  GET / HTTP/1.1
  User-Agent: curl/7.29.0
  Host: www.google.com
  Accept: */*

url-retrieve (error 400):
  GET https://www.google.com/ HTTP/1.1
  MIME-Version: 1.0
  Extension: Security/Digest Security/SSL
  Host: www.google.com
  Accept-encoding: gzip
  Accept: */*
  User-Agent: URL/Emacs

I've tried it with the GNU/Emacs 25.1 and 24.3.1 releases (with -Q
command line option).

Is it a bug? Any ideas  would be appreciated.

    - Andrew



             reply	other threads:[~2016-11-08  6:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08  6:18 Andrew Savonichev [this message]
2016-11-08 11:58 ` `url-retrieve' for https behind proxy: 400 bad request tomas
2016-11-08 12:19   ` Yuri Khan
2016-11-08 16:26   ` David Engster
2016-11-09  8:51     ` tomas
2016-11-10 18:07     ` Andrew Savonichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL53kkLaUYceGsH-23-4h9MhWjjhoBZ8iYBRY1o=jkfUB1jnsQ@mail.gmail.com' \
    --to=andrew.savonichev@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.