From b99a6ec8b272f99a74714b7a77a518ef27d6ffbe Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 2 Oct 2019 23:56:30 +0200 Subject: Support HTTP/2 responses --- acme-tinier.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }) } -- cgit v1.2.3-70-g09d2