From fa00b2c1384929d4c394359846b073ddd515de81 Mon Sep 17 00:00:00 2001 From: Himanshu Anand Date: Mon, 27 Jun 2022 16:32:42 +0100 Subject: [PATCH] Adding handling for double quoted in user agent, my fix cause double escape with post body so checkign the double escape and removing it from post body --- h2c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/h2c b/h2c index c2f2731..91fa81b 100755 --- a/h2c +++ b/h2c @@ -79,6 +79,7 @@ while() { my $l = $_; # discard CRs completely $l =~ s/\r//g; + $l =~ s/\"/\\"/g; if(!$state) { chomp $l; if($l =~ /([^ ]*) +(.*) +(HTTP\/.*)/) { @@ -321,6 +322,7 @@ if($disableheadersnotseen) { } if(!$header{'user-agent'}) { $disabledheaders .= "$opt_header User-Agent: "; + } } @@ -412,6 +414,7 @@ if($uselibcurl) { close(C); } else { + $curlcmd =~ s/\\\\\"/\\"/g; print "$curlcmd\n"; }