Skip to content

Commit

Permalink
adding test for nodejs/undici#2971
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Mar 19, 2024
1 parent 59e7074 commit fc23bb0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/basic_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,3 +417,14 @@ TYPED_TEST(basic_tests, nodejs_51619) {
ASSERT_FALSE(out);
SUCCEED();
}

// https://github.com/nodejs/undici/pull/2971
TYPED_TEST(basic_tests, nodejs_undici_2971) {
std::string_view base = "https://non-ascii-location-header.sys.workers.dev/redirect";
auto base_url = ada::parse<TypeParam>(base);
ASSERT_TRUE(base_url);
auto out = ada::parse<TypeParam>("/\xec\x95\x88\xeb\x85\x95", &*base_url);
ASSERT_TRUE(out);
ASSERT_EQ(out->get_href(), R"(https://non-ascii-location-header.sys.workers.dev/%EC%95%88%EB%85%95)");
SUCCEED();
}

0 comments on commit fc23bb0

Please sign in to comment.