unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Rui Yang <ryang.sei@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 51966@debbugs.gnu.org
Subject: bug#51966: url-retrieve freeze when connecting to identity.xero.com
Date: Sun, 21 Nov 2021 22:45:41 +1100	[thread overview]
Message-ID: <CAHmBojJj+zJBMMDeZEB2Mth31GU+Zsx_POsY-Zc3+Q5fUnQBVQ@mail.gmail.com> (raw)
In-Reply-To: <87czmvqhqr.fsf@gnus.org>


[-- Attachment #1.1: Type: text/plain, Size: 2987 bytes --]

Hi Lars,

Thanks for looking into this.
I did the following, pls help to see if it helps.

1. Emacs from Homebrew Install Emacs using Homebrew in MacOS Big Sur.
- Install using
brew install emacs
- Got an Emacs in Terminal withou GUI
- Pasted the following

> (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/token")
>         (method "POST"))
>    (url-retrieve url 'http-handle-response (append (list method url
> (format "*HTTP %s %s*" method url)) '())))
>  t)
>
- Got response very quickly in the buffer displayed (expected behaviour)

> (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/token")
>         (method "POST"))
>    (url-retrieve url 'http-handle-response (append (list method url
> (format "*HTTP %s %s*" method url)) '())))
>  t)
>

2. Install Emacs from
https://emacsformacosx.com/emacs-builds/Emacs-27.2-3-universal.dmg
- start Emacs from command line with:

> /Applications/Emacs.app/Contents/MacOS/Emacs --no-init
>
- execute the above script
- I got the following:
[image: image.png]
You could see that the *http... buffer is always empty and stay like that
for some time (maybe 30s), and eventually, the mini buffer showed a nil.
[image: image.png]

Could this be an issue only for the binary from emacsformacosx?

Regards,
Rui


On Sat, Nov 20, 2021 at 8:49 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Rui Yang <ryang.sei@gmail.com> writes:
>
> > 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
>
> I'm unable to reproduce the issue with either Emacs 27.2 or the current
> trunk -- with your test case I just get this page:
>
> HTTP/1.1 301 Moved Permanently
> Server: AkamaiGHost
> Content-Length: 0
> Location: https://login.xero.com/identity/user/login
>
> Is there something else needed to reproduce the problem?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>

[-- Attachment #1.2: Type: text/html, Size: 4775 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 348140 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 330005 bytes --]

  reply	other threads:[~2021-11-21 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  7:27 bug#51966: url-retrieve freeze when connecting to identity.xero.com Rui Yang
2021-11-20  9:49 ` Lars Ingebrigtsen
2021-11-21 11:45   ` Rui Yang [this message]
     [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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAHmBojJj+zJBMMDeZEB2Mth31GU+Zsx_POsY-Zc3+Q5fUnQBVQ@mail.gmail.com \
    --to=ryang.sei@gmail.com \
    --cc=51966@debbugs.gnu.org \
    --cc=larsi@gnus.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).