in reply to Perl Shields/Badges

It looks like github is doing something nasty to the image links. If I do View Image on the "kwalitee" link it gives a URL under https://camo.githubusercontent.com/ and error "Error Fetching Resource" (404). This sounds to me like github is replacing your image URLs with its own fetched-and-cached versions and their cache is duff. The real image at https://cpants.cpanauthors.org/dist/Syntax-Construct.png renders fine.

So, I think this one might not be a problem at the CPANTS end.

Replies are listed 'Best First'.
Re^2: Perl Shields/Badges
by choroba (Cardinal) on Jun 08, 2017 at 13:41 UTC
    You might be right, at least partially. It seems GitHub started to cache images (coming both from http and https), and requires some headers to be specified to work properly. Maybe that's what's missing on CPAN's side? Aggressive image caching breaks image badges #224

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      Yes, that's it and they are doing it on purpose. Personally I think that's a very poor decision by github.

      Since the origin image renders fine with a query string, maybe you could try https://cpants.cpanauthors.org/dist/Syntax-Construct.png?17-06-08 or similar to defeat the cache? Just bump the readme date when there's a new release.