unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23620: 25.0.94; url-retrieve fails on localhost
@ 2016-05-25 18:45 Artur Malabarba
  2016-05-28 16:42 ` Paul Eggert
  2016-06-26 21:58 ` bug#23620: 24.3; url-retrieve-synchronously doesn't fallback to IPv4 Paul Eggert
  0 siblings, 2 replies; 24+ messages in thread
From: Artur Malabarba @ 2016-05-25 18:45 UTC (permalink / raw)
  To: 23620


Assuming you have a webserver serving on localhost:5100, run the
following snippet:

(url-retrieve "http://localhost:5100/"
              (lambda (&rest r)
                (message "%S" r)))

It fails with the following error:
    (:error (error connection-failed "failed with code 111\n"
                   :host "localhost"
                   :service 5100))

Note that if I switch to a terminal and try curl:
    curl "http://localhost:5100/"
it works fine.

Using `url-retrieve' on remote urls also works fine.





^ permalink raw reply	[flat|nested] 24+ messages in thread
* bug#17976: 24.3; url-retrieve-synchronously doesn't fallback to IPv4
@ 2014-07-09 12:38 Juliusz Chroboczek
  2014-07-09 13:06 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Juliusz Chroboczek @ 2014-07-09 12:38 UTC (permalink / raw)
  To: 17976


My machine has both IPv6 and IPv4.  I'm accessing a server that has both
IPv6 and IPv4, but whose web server listens on IPv4 only.  The web server
is doing the right thing, sending RST upon IPv6 connection attempts.  Wget
and telnet do the right thing, they fallback to IPv4:

  $ telnet moule.informatique.univ-paris-diderot.fr 8080
  Trying 2001:660:3301:8070::40...
  Trying 194.254.199.40...
  Connected to moule.informatique.univ-paris-diderot.fr.
  Escape character is '^]'.

On the other hand, url-retrieve-synchronously returns an empty string.
Tcpdump shows that it's never even trying IPv4:

  (with-current-buffer
    (url-retrieve-synchronously
     "http://moule.informatique.univ-paris-diderot.fr:8080")
    (buffer-substring (point-min) (point-max)))
  ""

  (with-current-buffer
    (url-retrieve-synchronously "http://194.254.199.40:8080")
    (buffer-substring (point-min) (point-max)))
  "HTTP/1.1 200 OK
  ..."





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-10-21 23:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 18:45 bug#23620: 25.0.94; url-retrieve fails on localhost Artur Malabarba
2016-05-28 16:42 ` Paul Eggert
2016-06-01 14:55   ` Artur Malabarba
2016-06-01 16:43     ` Paul Eggert
2016-06-01 19:04       ` Artur Malabarba
2016-06-26 21:58 ` bug#23620: 24.3; url-retrieve-synchronously doesn't fallback to IPv4 Paul Eggert
2016-06-26 23:20   ` Juliusz Chroboczek
2017-10-21 23:55     ` bug#17976: " Noam Postavsky
  -- strict thread matches above, loose matches on Subject: below --
2014-07-09 12:38 Juliusz Chroboczek
2014-07-09 13:06 ` Andreas Schwab
2014-07-09 20:25   ` Juliusz Chroboczek
2014-07-10  7:17     ` Andreas Schwab
2014-07-10 20:28       ` Juliusz Chroboczek
2014-07-10 20:54       ` Juliusz Chroboczek
2014-07-11 12:21     ` Andreas Schwab
2015-12-25 20:33 ` Lars Ingebrigtsen
2015-12-25 20:43   ` Eli Zaretskii
2015-12-25 20:48     ` Lars Ingebrigtsen
2015-12-25 21:14       ` Andreas Schwab
2015-12-25 21:23         ` Lars Ingebrigtsen
2015-12-25 21:44           ` Andreas Schwab
2015-12-25 23:15           ` Juliusz Chroboczek
2015-12-25 21:00   ` Andreas Schwab
2016-06-12 18:36 ` Paul Eggert

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).