We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 47349eb + 4b168df commit 9513146Copy full SHA for 9513146
lib/MetaCPAN/Script/River.pm
@@ -15,7 +15,7 @@ has river_url => (
15
isa => Uri,
16
coerce => 1,
17
required => 1,
18
- default => 'https://neilb.org/FIXME',
+ default => 'http://neilb.org/river-of-cpan.json.gz',
19
);
20
21
has _ua => (
@@ -53,7 +53,14 @@ sub retrieve_river_summaries {
53
54
$self->handle_error( $resp->status_line ) unless $resp->is_success;
55
56
- return decode_json $resp->content;
+ # cleanup headers if .json.gz is served as gzip type
57
+ # rather than json encoded with gzip
58
+ if ( $resp->header('Content-Type') eq 'application/x-gzip' ) {
59
+ $resp->header( 'Content-Type' => 'application/json' );
60
+ $resp->header( 'Content-Encoding' => 'gzip' );
61
+ }
62
+
63
+ return decode_json $resp->decoded_content;
64
}
65
66
__PACKAGE__->meta->make_immutable;
0 commit comments