Bug 215425 - ports-mgmt/distilator: report when an URL gives a redirect
Summary: ports-mgmt/distilator: report when an URL gives a redirect
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-19 19:22 UTC by Mathieu Arnold
Modified: 2018-08-27 16:31 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ehaupt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Arnold freebsd_committer 2016-12-19 19:22:34 UTC
Today I was reviewing a patch, and distilator reported:

$ distilator .
200 [DISTFILE]  https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz
200 [WWW]       http://dnscrypt.org
500 [DISTFILE]  https://www.dns-lab.com/downloads/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz
200 [DISTFILE]  http://www.dns-lab.com/downloads/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz

It was right for the 500 on the third line, it is broken.

But the fourth line, while true that it is 200 as it does end up getting the right file, it goes through a redirect:

$ curl -IL http://www.dns-lab.com/downloads/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz
HTTP/1.1 301 Moved Permanently
Date: Mon, 19 Dec 2016 19:19:52 GMT
Server: Apache
Location: http://dns-lab.com/downloads/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Mon, 19 Dec 2016 19:19:52 GMT
Server: Apache
Last-Modified: Mon, 19 Dec 2016 17:49:15 GMT
ETag: "189a9d-5440689be5cc0"
Accept-Ranges: bytes
Content-Length: 1612445
P3P: policyref="/w3c/p3p.xml", CP="OTI DSP COR LAW ADMa DEVa TAIi IVAi IVD HISa OUR STP UNI"
X-Robots-Tag: noarchive
Content-Type: application/x-gzip


And as we prefer to get the right URL first, it would be nice if distilator could say something like:

301 [DISTFILE]  http://www.dns-lab.com/downloads/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz
             -> http://dns-lab.com/downloads/dnscrypt-proxy/dnscrypt-proxy-1.8.1.tar.gz

or something, to get people's attention :-)
Comment 1 Emanuel Haupt freebsd_committer 2016-12-19 21:06:16 UTC
That's a great idea. I'll come up with something.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-14 00:35:55 UTC
Is this still relevant?
Comment 3 Emanuel Haupt freebsd_committer 2018-02-10 15:10:01 UTC
It is still on my to do list.
Comment 4 commit-hook freebsd_committer 2018-08-27 16:29:21 UTC
A commit references this bug:

Author: ehaupt
Date: Mon Aug 27 16:28:43 UTC 2018
New revision: 478219
URL: https://svnweb.freebsd.org/changeset/ports/478219

Log:
  - Update to 1.0
  - Add WWW and provide an additional mirror
  - Provide a longer description as requested by portlint

  - Distilator will now report when an URL gives a redirect
  - Rewritten in python using requests and requests_ftp
  - Licensed under BSD2CLAUSE

  PR:		215425
  Requested by:	mat

Changes:
  head/ports-mgmt/distilator/Makefile
  head/ports-mgmt/distilator/distinfo
  head/ports-mgmt/distilator/pkg-descr
  head/ports-mgmt/distilator/pkg-plist
Comment 5 Emanuel Haupt freebsd_committer 2018-08-27 16:31:02 UTC
Finally implemented. Thanks for your patience. Port has been updated.