aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2019-10-02 23:56:30 +0200
committerPřemysl Janouch <p@janouch.name>2019-10-02 23:56:30 +0200
commitb99a6ec8b272f99a74714b7a77a518ef27d6ffbe (patch)
treedd53dfe0c9cdf4777454b7506fdf60e63a297e5d
parent361e0e52e0d50552dabc57091002a56245611539 (diff)
downloadacme-tinier-b99a6ec8b272f99a74714b7a77a518ef27d6ffbe.tar.gz
acme-tinier-b99a6ec8b272f99a74714b7a77a518ef27d6ffbe.tar.xz
acme-tinier-b99a6ec8b272f99a74714b7a77a518ef27d6ffbe.zip
Support HTTP/2 responses
-rwxr-xr-xacme-tinier.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/acme-tinier.pl b/acme-tinier.pl
index 6ff2a86..1c32124 100755
--- a/acme-tinier.pl
+++ b/acme-tinier.pl
@@ -57,7 +57,7 @@ sub get {
my $resp = communicate(@args, $url, $data);
die 'cannot download' if $? >> 8;
my ($code, $headers, $body) =
- $resp =~ m#\AHTTP/\d\.\d (\d+) .*?\r\n(.*?)\r\n\r\n(.*)#sm;
+ $resp =~ m#\AHTTP/\d(?:\.\d)? (\d+) .*?\r\n(.*?)\r\n\r\n(.*)#sm;
return ($code, $body, { $headers =~ /(\S+?): (.*)\r\n/mg })
}