Commit ab2aa567 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Fix test failure

Now http_parser_parse_url returns nonzero if empty URI is given.
parent ff87a542
......@@ -1581,6 +1581,10 @@ int construct_push_component(BlockAllocator &balloc, StringRef &scheme,
int rv;
StringRef rel, relq;
if (uri.size() == 0) {
return -1;
}
http_parser_url u{};
rv = http_parser_parse_url(uri.c_str(), uri.size(), 0, &u);
......
......@@ -995,12 +995,8 @@ void test_http2_construct_push_component(void) {
uri = StringRef{};
CU_ASSERT(0 == http2::construct_push_component(balloc, scheme, authority,
path, base, uri));
CU_ASSERT("" == scheme);
CU_ASSERT("" == authority);
CU_ASSERT("/" == path);
CU_ASSERT(-1 == http2::construct_push_component(balloc, scheme, authority,
path, base, uri));
scheme = StringRef{};
authority = StringRef{};
path = StringRef{};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment