[PATCH] opkg needs to follow 302 redirect Location headers

Tick Chen tick at openmoko.com
Wed Sep 10 11:49:24 CEST 2008


Hi Rod, 
  Already in svn 4640. 
Thanks Graeme, your 1 sec faster than me. :P

Cheers, 
Tick
On Wed, Sep 10, 2008 at 05:03:51PM +0930, Rod Whitby wrote:
> 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
> 
> _______________________________________________
> opkg-devel mailing list
> opkg-devel at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/opkg-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/opkg-devel/attachments/20080910/88150260/attachment.pgp 


More information about the opkg-devel mailing list