unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [happy@mcplaksin.org: HTTP redirects make url-retrieve-synchronously asynchronous]
@ 2006-01-10 15:21 Richard M. Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard M. Stallman @ 2006-01-10 15:21 UTC (permalink / raw)


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

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

* [happy@mcplaksin.org: HTTP redirects make url-retrieve-synchronously asynchronous]
@ 2006-01-17 19:59 Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2006-01-17 19:59 UTC (permalink / 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 -------

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

end of thread, other threads:[~2006-01-17 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-10 15:21 [happy@mcplaksin.org: HTTP redirects make url-retrieve-synchronously asynchronous] Richard M. Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-01-17 19:59 Richard Stallman

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