curl-library
Prevent curl to trigger progressbar on 302 redirections
Date: Fri, 11 Jan 2013 01:18:36 +0100
Hi all
I'm curious about this. The thing is that I'm using a redirector on my
server (using Mirrorbrain) and when curl download a file from there it
trigger the progressbar twice, downloading just bytes (I assume that it is
the redirection) in the first one, and the proper file in the second one.
My headers are big, because Mirrorbrain puts a lot of stuff there:
[faidoc_at_Delorean ~]$ curl -sD- -o/dev/null
> http://mirrors.cinnarch.com/cinnarch-core/x86_64/cinnarch-keyring-20120717-3-any.pkg.tar.xz
> HTTP/1.1 302 Found
> Date: Fri, 11 Jan 2013 00:14:12 GMT
> Server: Apache/2.2.16 (Debian)
> X-MirrorBrain-Mirror: softlibre.unizar.es
> X-MirrorBrain-Realm: country
> Link: <
> http://mirrors.cinnarch.com/cinnarch-core/x86_64/cinnarch-keyring-20120717-3-any.pkg.tar.xz.meta4>;
> rel=describedby; type="application/metalink4+xml"
> Link: <
> http://softlibre.unizar.es/cinnarch/cinnarch-core/x86_64/cinnarch-keyring-20120717-3-any.pkg.tar.xz>;
> rel=duplicate; pri=1; geo=es
> Link: <
> http://www.mirrorservice.org/sites/repo.cinnarch.com/cinnarch-core/x86_64/cinnarch-keyring-20120717-3-any.pkg.tar.xz>;
> rel=duplicate; pri=2; geo=gb
> Link: <
> http://cinnarch.limun.org/cinnarch-core/x86_64/cinnarch-keyring-20120717-3-any.pkg.tar.xz>;
> rel=duplicate; pri=3; geo=de
> Digest: MD5=rmURnbMAoRYoNhtja1VQgA==
> Digest: SHA=Hu0X2ym8sBEUQGaXjvFQHdIctgw=
> Digest: SHA-256=nfFkPNZd8vq05MUCxOVqlwE3YMrAJzT9R0xga6P0DNY=
> Location:
> http://softlibre.unizar.es/cinnarch/cinnarch-core/x86_64/cinnarch-keyring-20120717-3-any.pkg.tar.xz
> Vary: Accept-Encoding
> Content-Length: 369
> Content-Type: text/html; charset=iso-8859-1
But this is not happening with others 302 redirections, which just trigger
once the progressbar:
[faidoc_at_Delorean ~]$ curl -sD- -o/dev/null
> https://www.archlinux.org/packages/extra/i686/aalib/download/
> HTTP/1.1 302 FOUND
> Date: Fri, 11 Jan 2013 00:14:50 GMT
> Server: Apache
> X-Frame-Options: DENY
> Content-Length: 0
> Location:
> http://mirror.us.leaseweb.net/archlinux/extra/os/i686/aalib-1.4rc5-9-i686.pkg.tar.xz
> Vary: User-Agent,Accept-Encoding
> Content-Type: text/html; charset=utf-8
Could you explain me this?
Thanks
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-01-11