Browse Source

Added test case for #1065

Yuji Hirose 4 years ago
parent
commit
301faa074c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      test/test.cc

+ 6 - 0
test/test.cc

@@ -171,6 +171,12 @@ TEST(GetHeaderValueTest, RegularValue) {
   EXPECT_STREQ("text/html", val);
   EXPECT_STREQ("text/html", val);
 }
 }
 
 
+TEST(GetHeaderValueTest, RegularValueWithDifferentCase) {
+  Headers headers = {{"Content-Type", "text/html"}, {"Dummy", "Dummy"}};
+  auto val = detail::get_header_value(headers, "content-type", 0, "text/plain");
+  EXPECT_STREQ("text/html", val);
+}
+
 TEST(GetHeaderValueTest, SetContent) {
 TEST(GetHeaderValueTest, SetContent) {
   Response res;
   Response res;