all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Mark Schreiber <mark7@alumni.cmu.edu>
Cc: 24365@debbugs.gnu.org
Subject: bug#24365: 24.4; [PATCH] url-http-options fails when connection refused
Date: Wed, 06 Dec 2017 05:47:39 -0500	[thread overview]
Message-ID: <87y3mgf7zo.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87inucqdwj.fsf@war.peplook.com> (Mark Schreiber's message of "Sun, 04 Sep 2016 01:15:24 -0700")

found 24365 25.3
quit

Mark Schreiber <mark7@alumni.cmu.edu> writes:

> url-http-options fails when a web server refuses its connection.
>
> Evaluating (url-http-options "http://127.0.0.1:33333/") results in the
> following error:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   url-http-options("http://127.0.0.1:33333/")

In emacs-26, I get a "Connection refused" error, which seems reasonable.

Debugger entered--Lisp error: (file-error "make client process failed" "Connection refused" :name "127.0.0.1" :buffer #<buffer  *url-http-temp*> :host "127.0.0.1" :service 33333 :nowait nil :tls-parameters nil)
  make-network-process(:name "127.0.0.1" :buffer #<buffer  *url-http-temp*> :host "127.0.0.1" :service 33333 :nowait nil :tls-parameters nil)
  open-network-stream("127.0.0.1" #<buffer  *url-http-temp*> "127.0.0.1" 33333 :type plain :nowait nil)
  url-open-stream("127.0.0.1" #<buffer  *url-http-temp*> "127.0.0.1" 33333 nil)
  url-http-find-free-connection("127.0.0.1" 33333 nil)
  url-http(#s(url :type "http" :user nil :password nil :host "127.0.0.1" :portspec 33333 :filename "/" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) #f(compiled-function (&rest ignored) #<bytecode 0x5a532d>) (nil))
  url-retrieve-internal("http://127.0.0.1:33333/" #f(compiled-function (&rest ignored) #<bytecode 0x5a532d>) (nil) nil nil)
  url-retrieve("http://127.0.0.1:33333/" #f(compiled-function (&rest ignored) #<bytecode 0x5a532d>) nil nil nil)
  url-retrieve-synchronously("http://127.0.0.1:33333/")
  url-http-options("http://127.0.0.1:33333/")

> In my case, this caused the third-party package org-caldav to fail with
> this error when M-x org-caldav-sync was invoked and given an incorrect
> org-caldav-url.
>
> I believe that the correct behavior would be to have url-http-options
> return nil, which is the behavior of that function when it receives an
> HTTP error response.

The error which is thrown in emacs-26 would make it clear that you need
to correct the url, so I think we should leave it as is.





      reply	other threads:[~2017-12-06 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-04  8:15 bug#24365: 24.4; [PATCH] url-http-options fails when connection refused Mark Schreiber
2017-12-06 10:47 ` Noam Postavsky [this message]

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=87y3mgf7zo.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=24365@debbugs.gnu.org \
    --cc=mark7@alumni.cmu.edu \
    /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.