diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-22 11:52:04 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-22 11:52:04 -0800 |
| commit | 497b8e22047fb0efa3397289d23656d6483fdd6d (patch) | |
| tree | 8f2caf7dddc49e144b7e715ed64999792e796f66 /src/supplemental/http/http_server_test.c | |
| parent | 8d1b52931b1d7ad8fabffe0098b9bc31c0b61a9b (diff) | |
| download | nng-497b8e22047fb0efa3397289d23656d6483fdd6d.tar.gz nng-497b8e22047fb0efa3397289d23656d6483fdd6d.tar.bz2 nng-497b8e22047fb0efa3397289d23656d6483fdd6d.zip | |
http: setting response status never fails (breaking API change)
Diffstat (limited to 'src/supplemental/http/http_server_test.c')
| -rw-r--r-- | src/supplemental/http/http_server_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |
