Skip to content

Commit c3ba021

Browse files
committed
Make http test compile again
Fix compilation issue with printf and stringview. Printf has to know the length as stringview may not be null-terminated.
1 parent 1e5ffcc commit c3ba021

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/integration/net/http/service.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void Service::ready()
8888
printf("Error: %s \n", err.to_string().c_str());
8989

9090
CHECKSERT(!err, "No error");
91-
printf("Received body: %s\n", res->body());
91+
printf("Received body: %.*s\n", static_cast<int>(res->body().length()), res->body().data());
9292
CHECKSERT(res->body() == "/testing", "Received body: \"/testing\"");
9393

9494
printf("SUCCESS\n");

0 commit comments

Comments
 (0)