all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rui Yang <ryang.sei@gmail.com>
To: 51966@debbugs.gnu.org
Subject: bug#51966: url-retrieve freeze when connecting to identity.xero.com
Date: Fri, 19 Nov 2021 18:27:51 +1100	[thread overview]
Message-ID: <CAHmBojJNbzz-2N+ku0TfgC3DAME3+-okSWeFUsunrPz70bHJXg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4115 bytes --]

--text follows this line--

Emacs -Q
;; the following script hopefully will demonstrate the issue
;; after evaluating the code below, url-retrieve seems started a new
;; process to do the https call, that call should give a bad request with
;; json response {"error":"invalid_client"}
;; but it took a lot of time for the call back to be called
;; I suspect sth special about Xero domain’s certificate which caused
;; this issue. https://www.google.com.au is fine
;; tried starting with emacs option, --no-init
(setq url-debug t)

(defun http-handle-response (status method &optional url bufname raw
stay-in-window)
  "Switch to the buffer returned by `url-retreive'.
The buffer contains the raw HTTP response sent by the server."
  (message (format "%s" raw)))

(display-buffer
 (let* ((url "https://identity.xero.com/connect/post")
        (method "POST"))
   (url-retrieve url 'http-handle-response (append (list method url (format
"*HTTP %s %s*" method url)) '())))
 t)

;; the following curl command will return response very quickly
curl -X POST https://identity.xero.com/connect/token -H 'Authorization:
Basic  abc' -H 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'abc=def'

Response: {"error":"invalid_client"}



In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
Version 10.14.6 (Build 18G95))
 of 2021-03-28 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.4

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_AU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 45081 6477)
 (symbols 48 5924 1)
 (strings 32 15291 1697)
 (string-bytes 1 507781)
 (vectors 16 10217)
 (vector-slots 8 127225 14272)
 (floats 8 19 50)
 (intervals 56 185 0)
 (buffers 1000 12))

[-- Attachment #2: Type: text/html, Size: 4736 bytes --]

             reply	other threads:[~2021-11-19  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  7:27 Rui Yang [this message]
2021-11-20  9:49 ` bug#51966: url-retrieve freeze when connecting to identity.xero.com Lars Ingebrigtsen
2021-11-21 11:45   ` Rui Yang
     [not found]     ` <CAHmBojJuwgmJ0MUgaEYh7=U078KThAGqCvEgTCB-vmpdQqfsmw@mail.gmail.com>
     [not found]       ` <CAHmBojLBXue96jPG6+PKrN9dJ2-cCBwENu9=q0nN9xNFjDRWfw@mail.gmail.com>
     [not found]         ` <CAHmBojJKY=RasnTOZUPZitJQrNqch6tNMN6tPsM63s4VY-P_dQ@mail.gmail.com>
2021-11-29 14:02           ` Lars Ingebrigtsen

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=CAHmBojJNbzz-2N+ku0TfgC3DAME3+-okSWeFUsunrPz70bHJXg@mail.gmail.com \
    --to=ryang.sei@gmail.com \
    --cc=51966@debbugs.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.