Skip to content

Commit c8a687d

Browse files
committed
Fix false positive in cookie check
1 parent 4ed3ffa commit c8a687d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/msftidy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ def check_lines
538538
end
539539

540540
# do not read Set-Cookie header (ignore commented lines)
541-
if ln =~ /^(?!\s*#).+\[['"]Set-Cookie['"]\]/i
541+
if ln =~ /^(?!\s*#).+\[['"]Set-Cookie['"]\](?!\s*=[^=~]+)/i
542542
warn("Do not read Set-Cookie header directly, use res.get_cookies instead: #{ln}", idx)
543543
end
544544

0 commit comments

Comments
 (0)