From 30fe56c2843b1b16214cd3c9007b9832a7be8b21 Mon Sep 17 00:00:00 2001 From: "K. Andrew Parker" Date: Fri, 17 Jul 2020 14:54:11 -0400 Subject: [PATCH] tighten up regex for query_sage_server response --- lib/WeBWorK/PG/IO.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WeBWorK/PG/IO.pm b/lib/WeBWorK/PG/IO.pm index 93c3d90479..fd507c3baf 100644 --- a/lib/WeBWorK/PG/IO.pm +++ b/lib/WeBWorK/PG/IO.pm @@ -326,8 +326,8 @@ sub query_sage_server { my $header_block = shift(@lines); warn "checking for header: $header_block" if $debug; next unless $header_block=~/\S/; #skip empty lines; - next if $header_block=~/HTTP/ and $header_block=~/100/; # skip continue line - if ($header_block=~/200/) { # 200 return is ok + next if ($header_block =~ m!HTTP[ 12/.]+100!); # skip continue line + if ($header_block=~ m!HTTP[ 12/.]+200!) { # 200 return is ok $header_ok=1; last; }