From 497b8e22047fb0efa3397289d23656d6483fdd6d Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 22 Dec 2024 11:52:04 -0800 Subject: http: setting response status never fails (breaking API change) --- src/supplemental/http/http_server_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/supplemental/http/http_server_test.c') diff --git a/src/supplemental/http/http_server_test.c b/src/supplemental/http/http_server_test.c index ddae77d3..f29fa52b 100644 --- a/src/supplemental/http/http_server_test.c +++ b/src/supplemental/http/http_server_test.c @@ -155,12 +155,12 @@ httpecho(nng_aio *aio) if (((rv = nng_http_res_alloc(&res)) != 0) || ((rv = nng_http_res_copy_data(res, body, len)) != 0) || ((rv = nng_http_res_set_header( - res, "Content-type", "text/plain")) != 0) || - ((rv = nng_http_res_set_status(res, NNG_HTTP_STATUS_OK)) != 0)) { + res, "Content-type", "text/plain")) != 0)) { nng_http_res_free(res); nng_aio_finish(aio, rv); return; } + nng_http_res_set_status(res, NNG_HTTP_STATUS_OK); nng_aio_set_output(aio, 0, res); nng_aio_finish(aio, 0); } -- cgit v1.2.3-70-g09d2