<div dir="ltr">Yeah, -L is the flag that makes it follow the redirect, IIRC.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 5, 2016 at 1:03 PM, Bret A. Barker <span dir="ltr"><<a href="mailto:bret.barker@canonical.com" target="_blank">bret.barker@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Dec 05, 2016 at 03:52:32PM +0100, Didier Roche wrote:<br>
> Le 05/12/2016 à 15:38, Gustavo Niemeyer a écrit :<br>
> ><br>
> ><br>
> > On Mon, Dec 5, 2016 at 12:23 PM, Didier Roche <<a href="mailto:didrocks@ubuntu.com">didrocks@ubuntu.com</a><br>
</span><span class="">> > <mailto:<a href="mailto:didrocks@ubuntu.com">didrocks@ubuntu.com</a>>> wrote:<br>
> ><br>
> >     I did though write on the bug: "contrary to curl or wget which<br>
> >     both supports large downloads."<br>
> >     The feedback thread mentioned as well "while same assets can be<br>
> >     successfully downloaded via curl or wget".<br>
> ><br>
> >     I thought that was really obvious that they worked consistently<br>
> >     and that I did rerun then multiple times or I wouldn't have opened<br>
> >     the bug report + write this feedback. Sorry if that wasn't clear<br>
> >     enough, let's move on :)<br>
> ><br>
> ><br>
> > If you file a bug and a developer asks for specific information that<br>
> > wasn't provided, it means the specific information is not obvious.<br>
> ><br>
> >>     Is it the case?  Did you ever get a failure with them?  Are they<br>
> >>     retrying while they work? Do you have a verbose dumb of the process?<br>
> >     Yes, as mentioned. I never got any failure with any of them and I<br>
> >     did retry multiple times in loop when I saw the snapd failures.<br>
> >     wget is in verbose mode by default and I never got any hint that<br>
> >     it was retrying (just getting the normal download output).<br>
> ><br>
> >     I did just try a verbose download in curl (here, an ubuntu 300M<br>
> >     image). Here is the output: <a href="http://paste.ubuntu.com/23583568/" rel="noreferrer" target="_blank">http://paste.ubuntu.com/<wbr>23583568/</a><br>
</span>> >     <<a href="http://paste.ubuntu.com/23583568/" rel="noreferrer" target="_blank">http://paste.ubuntu.com/<wbr>23583568/</a>>. It seems that curl doesn't<br>
<div><div class="h5">> >     complain of any reconnect.<br>
> ><br>
> ><br>
> > You are downloading an image from an arbitrary server on the internet<br>
> > unrelated to the problem we're trying to debug.<br>
> ><br>
> > Can you please attempt these several curl downloads while using the<br>
> > exact same URL that failed for snapd?<br>
><br>
> As a developer asking for more debug information, can you please paste<br>
> the exact instructions on how to get those?<br>
><br>
> I'm trying the <a href="https://public.apps.ubuntu.com/anon/download-snap/" rel="noreferrer" target="_blank">https://public.apps.ubuntu.<wbr>com/anon/download-snap/</a> based<br>
> url with the .snap showing up in the logs to get the exact same assets I<br>
> pasted snapd information on. However, curl -v returns (output stripped out):<br>
> *   Trying 162.213.33.92...<br>
> * Connected to <a href="http://public.apps.ubuntu.com" rel="noreferrer" target="_blank">public.apps.ubuntu.com</a> (162.213.33.92) port 443 (#0)<br>
> * found 173 certificates in /etc/ssl/certs/ca-<wbr>certificates.crt<br>
> * found 692 certificates in /etc/ssl/certs<br>
> * ALPN, offering http/1.1<br>
> * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256<br>
> *      server certificate verification OK<br>
> *      server certificate status verification SKIPPED<br>
> *      common name: <a href="http://public.apps.ubuntu.com" rel="noreferrer" target="_blank">public.apps.ubuntu.com</a> (matched)<br>
> *      server certificate expiration date OK<br>
> *      server certificate activation date OK<br>
> *      certificate public key: RSA<br>
> *      certificate version: #3<br>
> *      subject: C=GB,L=London,O=Canonical Group<br>
> Ltd,CN=<a href="http://public.apps.ubuntu.com" rel="noreferrer" target="_blank">public.apps.ubuntu.com</a><br>
> *      start date: Mon, 30 May 2016 00:00:00 GMT<br>
> *      expire date: Wed, 21 Jun 2017 12:00:00 GMT<br>
> *      issuer: C=US,O=DigiCert Inc,CN=DigiCert SHA2 Secure Server CA<br>
> *      compression: NULL<br>
> * ALPN, server did not agree to a protocol<br>
> > GET /anon/download-snap/<wbr>YZ7LshLxDQQIrhAL6DMLub2yTVUA2D<wbr>IK_15.snap HTTP/1.1<br>
> > Host: <a href="http://public.apps.ubuntu.com" rel="noreferrer" target="_blank">public.apps.ubuntu.com</a><br>
> > User-Agent: curl/7.47.0<br>
> > Accept: */*<br>
> ><br>
> < HTTP/1.1 302 FOUND<br>
><br>
> I guess that's due to the macaroon exchanged system and I'm not<br>
> authorized or something else?<br>
> Thanks for helping debugging.<br>
><br>
> Cheers,<br>
> Didier<br>
<br>
</div></div>snapd first hits the Ubuntu Store URL (as above) that checks ACLs and then redirects to the CDN url. I don't know why `curl -v` doesn't follow the redirect, but the URL in the resulting 'Location' header will be the CDN url. Note that the CDN url contains a time-limited token in the query-string, so after a period you will need to get a fresh one from the store download endpoint.<br>
<span class="HOEnZb"><font color="#888888"><br>
-bret<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>gustavo @ <a href="http://niemeyer.net" target="_blank">http://niemeyer.net</a></div>
</div>