DonationCoder.com Forum

DonationCoder.com Software => Mouser's Zone => DcUpdater => Topic started by: owenduffy on February 15, 2009, 02:47 AM

Title: Dcupdater problems - v1.23.01?
Post by: owenduffy on February 15, 2009, 02:47 AM
Another problem:

DCUpdater does not follow a redirect returned by the web server when fetching the dcupdate.xml file.

In view of the very long time that other bugs have existed, there is no rush to fix this one, I will remove dcupdate support from my apps over the coming days.

Owen

Log:

Attempting to download 'http://www.vk1od.net/nfm/dcupdate.xml' as 'C:\DOCUME~1\owen\LOCALS~2\Temp\32B.tmp'.
Queued download of 'http://www.vk1od.net/nfm/dcupdate.xml' as 'C:\DOCUME~1\owen\LOCALS~2\Temp\32B.tmp'.
Nfm: Completed download of C:\DOCUME~1\owen\LOCALS~2\Temp\32B.tmp (0k).
ERROR: Config File 'C:\DOCUME~1\owen\LOCALS~2\Temp\32B.tmp' could not be loaded by TinyXml lib - Error reading end tag.
Nfm: get version failed
Title: Re: Dcupdater problems - v1.23.01?
Post by: mouser on February 15, 2009, 02:59 AM
owen, can you send me your dcupdate file (or program) and ill see if i can't get redirect options working.  if you send me what you think are the important bugfixes i can try to get them done this week as well. ([email protected])
Title: Re: Dcupdater problems - v1.23.01?
Post by: owenduffy on February 15, 2009, 03:19 AM
owen, can you send me your dcupdate file (or program) and ill see if i can't get redirect options working.  if you send me what you think are the important bugfixes i can try to get them done this week as well. ([email protected])

Mouser,

The dcupdate file is at the URL in the log message in my earlier post... but that URL is redirected to another URL. If you click on the link it will take you to the redirected URL. It seems that DCUpdater issues a request to fetch the contents at the URL in the config files without allowing / processing redirects.

Owen
Title: Re: Dcupdater problems - v1.23.01?
Post by: mouser on February 15, 2009, 04:40 AM
we should probably continue this discussion over email, but one thing that is important for me to know is if you've just manually put up a redirect html page, or whether you have told the webserver to send a 301 return code for an official redirect.

i ask because the downloader should follow the redirect if it gets a proper 301 status code reply from the web server.
Title: Re: Dcupdater problems - v1.23.01?
Post by: owenduffy on February 15, 2009, 09:34 PM
we should probably continue this discussion over email, but one thing that is important for me to know is if you've just manually put up a redirect html page, or whether you have told the webserver to send a 301 return code for an official redirect.

i ask because the downloader should follow the redirect if it gets a proper 301 status code reply from the web server.

As advised in email, the Apache web server is performing a redirection as a result of a redirect directive.

Here is a curl of the URL:

C:\>curl -i vk1od.net/nfm/dcupdate.xml
HTTP/1.1 301 Moved Permanently
Date: Mon, 16 Feb 2009 03:28:48 GMT
Server: Apache
Location: http://www.vk1od.net/software/nfm/dcupdate.xml
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

<!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://www.vk1od.net/software/nfm/dcupdate.xml">
here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at vk1od.net Port 80</ADDRESS>
</BODY></HTML>

But, to stress, I did not write this HTTP/HTML, it is created by the web server in response to a redirect directive.

I would expect most objects that open a URL will follow a redirect silently by default.

I open another xml file in the same folder using a VB control, and it works fine.

Owen
Title: Re: Dcupdater problems - v1.23.01?
Post by: mouser on February 15, 2009, 09:37 PM
ok thank you.. damn libcurl (the library i use in dcupdater) is not following the redirect the way it promises it will.. i may have to detect it manually and simulate the redirect myself if i can't get libcurl to work.  i'm not all that thrilled with libcurl.
Title: Re: Dcupdater problems - v1.23.01?
Post by: owenduffy on February 16, 2009, 12:15 AM
ok thank you.. damn libcurl (the library i use in dcupdater) is not following the redirect the way it promises it will.. i may have to detect it manually and simulate the redirect myself if i can't get libcurl to work.  i'm not all that thrilled with libcurl.

I am not really familiar with libcurl... but it looks like you might have to set an option to follow a redirect (CURLOPT_FOLLOWLOCATION).

Owen
Title: Re: Dcupdater problems - v1.23.01?
Post by: mouser on February 16, 2009, 12:27 AM
yeah i've done that.. it's ok, i can figure out a way to do it manually.. just one more thing to dislike about libcurl.
Title: Re: Dcupdater problems - v1.23.01?
Post by: owenduffy on March 18, 2009, 09:16 PM
ok thank you.. damn libcurl (the library i use in dcupdater) is not following the redirect the way it promises it will.. i may have to detect it manually and simulate the redirect myself if i can't get libcurl to work.  i'm not all that thrilled with libcurl.

http://curl.haxx.se/docs/adv_20090303.html

Title: Re: Dcupdater problems - v1.23.01?
Post by: mouser on March 19, 2009, 03:19 PM
yes i saw that -- doesn't really pose a risk to dcupdater though. -- at least i can't see any way for it to be exploited to make dcupdater do anything bad.
Title: Re: Dcupdater problems - v1.23.01?
Post by: owenduffy on March 24, 2009, 08:59 PM
yes i saw that -- doesn't really pose a risk to dcupdater though. -- at least i can't see any way for it to be exploited to make dcupdater do anything bad.

I was really drawing attention to the fact that it should handle redirects (redirect handling is the subject of the problem), and that there is an updated lib.

Owen
Title: Re: Dcupdater problems - v1.23.01?
Post by: mouser on December 20, 2009, 06:55 PM
after a huge amount of pain i believe i have redirect support now working in the yet unlreased update of dcupdater.  tested it on your file and it's working.
will be released soon as soon as i solve the win 7 issue some people are reporting.