Welcome Guest.   Make a donation to an author on the site October 25, 2014, 08:09:52 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the full one-year retrospective report on DonationCoder.com.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Dcupdater problems - v1.23.01?  (Read 7462 times)
owenduffy
Honorary Member
**
Posts: 27

View Profile Give some DonationCredits to this forum member
« on: February 15, 2009, 02:47:34 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
« Last Edit: February 15, 2009, 02:49:59 AM by owenduffy » Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: February 15, 2009, 02:59:35 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. (mouser@donationcoder.com)
Logged
owenduffy
Honorary Member
**
Posts: 27

View Profile Give some DonationCredits to this forum member
« Reply #2 on: February 15, 2009, 03:19:45 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. (mouser@donationcoder.com)

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
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: February 15, 2009, 04:40:58 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.
« Last Edit: February 15, 2009, 04:45:42 AM by mouser » Logged
owenduffy
Honorary Member
**
Posts: 27

View Profile Give some DonationCredits to this forum member
« Reply #4 on: February 15, 2009, 09:34:01 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
here
.<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
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: February 15, 2009, 09:37:45 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.
Logged
owenduffy
Honorary Member
**
Posts: 27

View Profile Give some DonationCredits to this forum member
« Reply #6 on: February 16, 2009, 12:15:21 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
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: February 16, 2009, 12:27:32 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.
Logged
owenduffy
Honorary Member
**
Posts: 27

View Profile Give some DonationCredits to this forum member
« Reply #8 on: March 18, 2009, 09:16:03 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

Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: March 19, 2009, 03:19:30 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.
Logged
owenduffy
Honorary Member
**
Posts: 27

View Profile Give some DonationCredits to this forum member
« Reply #10 on: March 24, 2009, 08:59:06 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
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: December 20, 2009, 06:55:18 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.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.035s | Server load: 0.09 ]