From 8ef6c377028a0a466b2b5a081b4f3d5bd41ba5ff Mon Sep 17 00:00:00 2001 From: Dan Lecocq Date: Wed, 16 Nov 2016 07:29:49 -0800 Subject: [PATCH] Passing test about robots.txt agent case insensitivity. --- src/robots.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/robots.cpp b/src/robots.cpp index a332eeb..e09f2e7 100644 --- a/src/robots.cpp +++ b/src/robots.cpp @@ -65,6 +65,9 @@ namespace Rep { if (key.compare("user-agent") == 0) { + // Store the user agent string as lowercased + std::transform(value.begin(), value.end(), value.begin(), ::tolower); + if (last_agent) { group.push_back(value);