topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 1:09 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Dcupdater problems - v1.23.01?  (Read 22010 times)

owenduffy

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Dcupdater problems - v1.23.01?
« 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
« Last Edit: February 15, 2009, 02:49 AM by owenduffy »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #1 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])

owenduffy

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #2 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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #3 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.
« Last Edit: February 15, 2009, 04:45 AM by mouser »

owenduffy

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #4 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...are/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...are/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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #5 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.

owenduffy

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #6 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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #7 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.

owenduffy

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #8 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/...cs/adv_20090303.html


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #9 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.

owenduffy

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 29
    • View Profile
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #10 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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dcupdater problems - v1.23.01?
« Reply #11 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.