From grdetil@scrc.umanitoba.ca Tue May 15 12:47:26 2001
Date: Tue, 15 May 2001 14:36:15 -0500 (CDT)
From: Gilles Detillieux <grdetil@scrc.umanitoba.ca>
To: on1mh@pandora.be
Cc: htdig-general@lists.sourceforge.net
Subject: Re: [htdig] Error 302 Redirect

According to Johan Maes:
> When indexen a number of servers, most of the time I see that the redirect is 
> a relative path. (especially for websites that need extra logins).
> 
> htdig (3.1.5) does not continue and says there is a http violation (following 
> the rfc's)
> Perhaps this is technically correct. But I see that most browser do not have 
> a problem with this kind of redirection.
> 
> Is there a workaround?

I haven't tested it, but it's a backport from 3.2.0b3, so it should work...

--- htdig/Retriever.cc.orig	Tue Feb 15 17:07:47 2000
+++ htdig/Retriever.cc	Tue May 15 14:16:17 2001
@@ -1287,7 +1287,9 @@ Retriever::got_href(URL &url, char *desc
 void
 Retriever::got_redirect(char *new_url, DocumentRef *old_ref)
 {
-    URL	url(new_url);
+    // First we must piece together the new URL, which may be relative
+    URL parent(old_ref->DocURL());
+    URL	url(new_url, parent);
 
     if (debug > 2)
 	cout << "redirect: " << url.get() << endl;

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

_______________________________________________
htdig-general mailing list <htdig-general@lists.sourceforge.net>
To unsubscribe, send a message to <htdig-general-request@lists.sourceforge.net> with a subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html
