Skip to content

Commit 793fbeb

Browse files
committed
downloadosm: do not accept "deflate" compression
1 parent 30e3bbc commit 793fbeb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

miscsrc/downloadosm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
#
55
# Author: Slaven Rezic
66
#
7-
# Copyright (C) 2008,2009,2010,2011,2012,2018 Slaven Rezic. All rights reserved.
7+
# Copyright (C) 2008,2009,2010,2011,2012,2018,2025 Slaven Rezic. All rights reserved.
88
# This program is free software; you can redistribute it and/or
99
# modify it under the same terms as Perl itself.
1010
#
11-
12-
# WWW: http://www.rezic.de/eserte/
11+
# WWW: https://github.com/eserte/bbbike
1312
#
1413

1514
# Download a data from openstreetmap into the specified directory
@@ -31,7 +30,7 @@ use BBBikeUtil qw(is_in_path);
3130

3231
sub save_pwd (&);
3332

34-
our $VERSION = "0.04";
33+
our $VERSION = "0.05";
3534

3635
use constant TIMEOUT => 60;
3736

@@ -115,7 +114,8 @@ my $ua = eval {
115114

116115
## the download server seems to block this user agent -> use the LWP default
117116
$ua->agent("downloadosm/$VERSION LWP/$LWP::VERSION [part of BBBike]");
118-
$ua->default_header('Accept-Encoding' => scalar HTTP::Message::decodable());
117+
my @decodable = grep { $_ ne 'deflate' } HTTP::Message::decodable(); # script cannot handle deflate correctly
118+
$ua->default_header('Accept-Encoding' => join(", ", @decodable));
119119
$ua->timeout($timeout);
120120
$ua;
121121
};

0 commit comments

Comments
 (0)