Skip to content

Commit

Permalink
tests: add a http/1.1 header to the ykval mock
Browse files Browse the repository at this point in the history
it lies a bit more convincingly like this
fixes #202
  • Loading branch information
klali committed Apr 16, 2020
1 parent 2cddac5 commit 7926f8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/aux/ykval.pl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
while(1) {
my $clientsocket = $socket->accept();
my $clientdata = <$clientsocket>;
my $ret = "h=ZrU7UfjwazJVf5ay1P/oC3XCQlI=\n";
my $ret = "HTTP/1.1 200 OK\n\n";
$ret .= "h=ZrU7UfjwazJVf5ay1P/oC3XCQlI=\n";

if($clientdata =~ m/nonce=([a-zA-Z0-9]+).*otp=([cbdefghijklnrtuv]+)/) {
my $nonce = $1;
Expand All @@ -71,6 +72,6 @@
} else {
$ret .= "status=MISSING_PARAMETER";
}
print $clientsocket "\n$ret\n";
print $clientsocket "$ret\n";
close $clientsocket;
}

0 comments on commit 7926f8d

Please sign in to comment.