[PATCH] opkg needs to follow 302 redirect Location headers

Rod Whitby rod at whitby.id.au
Wed Sep 10 09:33:51 CEST 2008


Some ipkg feeds (e.g. ipkg.nslu2-linux.org) use 302 redirect schemes
to load share across mirrors of the feeds.  Curl needs to be told to
follow these redirections, or else it tries to install a HTML file.

Signed-off-by: Rod Whitby <rod at whitby.id.au>

--- opkg/libopkg/opkg_download.c~       2008-07-29 20:36:59.000000000 +0000
+++ opkg/libopkg/opkg_download.c        2008-09-10 06:51:59.053403941 +0000
@@ -91,6 +91,7 @@
                curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, data);
                curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, cb);
        }
+       curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt (curl, CURLOPT_FAILONERROR, 1);
        if (conf->http_proxy || conf->ftp_proxy)
        {


-- Rod



More information about the opkg-devel mailing list