unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Subject: [happy@mcplaksin.org: HTTP redirects make url-retrieve-synchronously asynchronous]
Date: Tue, 17 Jan 2006 14:59:54 -0500	[thread overview]
Message-ID: <E1Eywzi-0005Ni-M0@fencepost.gnu.org> (raw)

[I sent this message a week ago but did not get a response.]

Would someone please look at this, and then ack?

------- Start of forwarded message -------
X-Injected-Via-Gmane: http://gmane.org/
To: emacs-pretest-bug@gnu.org
From: Mark Plaksin <happy@mcplaksin.org>
Date: Mon, 09 Jan 2006 13:18:46 -0500
X-Gmane-NNTP-Posting-Host: stone.tss.usg.edu
Cancel-Lock: sha1:UaHMftiRGaDChvZKQsoPebVNGFs=
Subject: HTTP redirects make url-retrieve-synchronously asynchronous
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.0 tests=HTML_MESSAGE autolearn=no 
	version=2.63

url-retrieve-synchronously becomes asynchronous when HTTP redirects are
involved.  When it encounters a redirect, url-http-parse-headers calls
url-retrieve instead of url-retrieve-synchronously.  Naively switching to
the latter doesn't solve the problem and I haven't been able to find a fix..

I encountered the problem in Gnus using nnrss.  I have an old URL for
Slashdot's RSS feed and was experimenting with setting mm-url-use-external
to nil.

To reproduce, evaluate this in *scratch*:
(mm-url-insert "http://slashdot.org/index.rss")

You'll get this:
("http://slashdot.org/index.rss" 316)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A HREF="http://rss.slashdot.org/Slashdot/slashdot">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at slashdot.org Port 80</ADDRESS>
</BODY></HTML>

To make the problem go away, add a breakpoint before "(when redirect-uri"
in url-http.el.  Then re-run the test and wait a few seconds after hitting
the breakpoint.  Tell the debugger to continue and you will get the
expected contents of Slashdot's RSS feed instead of the redirect message
above.

I'll keep trying to find a way to fix this but maybe it's trivial for
somebody who already understands the URL library.



_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

             reply	other threads:[~2006-01-17 19:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17 19:59 Richard Stallman [this message]
2006-01-18  3:13 ` Fwd: HTTP redirects make url-retrieve-synchronously asynchronous Stefan Monnier
2006-01-19 17:44   ` Richard M. Stallman
2006-01-20 21:56     ` Stefan Monnier
2006-01-22  3:59       ` Richard M. Stallman
2006-01-23 16:40         ` Stefan Monnier
2006-01-23 20:38           ` Stefan Monnier
2006-02-19 20:15             ` Mark Plaksin
2006-01-24 16:47           ` Richard M. Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-01-10 15:21 [happy@mcplaksin.org: HTTP redirects make url-retrieve-synchronously asynchronous] Richard M. Stallman

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=E1Eywzi-0005Ni-M0@fencepost.gnu.org \
    --to=rms@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 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).