Commit b3096736 authored by Kenton Varda's avatar Kenton Varda

Fix chunked body gather-write test.

The braced array literals seem to be constructed as temporaries. The test passes in debug builds, but in optimized builds, the arrays have been overwritten by the time they are used.
parent c94a88e4
......@@ -918,7 +918,9 @@ KJ_TEST("HttpClient chunked body gather-write") {
auto req = client->request(HttpMethod::POST, "/", HttpHeaders(table));
kj::ArrayPtr<const byte> bodyParts[] = {
{ 'f','o','o' }, { ' ' }, { 'b','a','r' }, { ' ' }, { 'b','a','z' }
"foo"_kj.asBytes(), " "_kj.asBytes(),
"bar"_kj.asBytes(), " "_kj.asBytes(),
"baz"_kj.asBytes()
};
req.body->write(kj::arrayPtr(bodyParts, kj::size(bodyParts))).wait(waitScope);
......
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