Skip to content

Commit fc23bb0

Browse files
committed
adding test for nodejs/undici#2971
1 parent 59e7074 commit fc23bb0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: tests/basic_tests.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,14 @@ TYPED_TEST(basic_tests, nodejs_51619) {
417417
ASSERT_FALSE(out);
418418
SUCCEED();
419419
}
420+
421+
// https://github.com/nodejs/undici/pull/2971
422+
TYPED_TEST(basic_tests, nodejs_undici_2971) {
423+
std::string_view base = "https://non-ascii-location-header.sys.workers.dev/redirect";
424+
auto base_url = ada::parse<TypeParam>(base);
425+
ASSERT_TRUE(base_url);
426+
auto out = ada::parse<TypeParam>("/\xec\x95\x88\xeb\x85\x95", &*base_url);
427+
ASSERT_TRUE(out);
428+
ASSERT_EQ(out->get_href(), R"(https://non-ascii-location-header.sys.workers.dev/%EC%95%88%EB%85%95)");
429+
SUCCEED();
430+
}

0 commit comments

Comments
 (0)