diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-08-09 17:43:07 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-08-09 17:43:07 -0700 |
| commit | 8dc9a75d57111d635b413f7628bd0bc61352a3ff (patch) | |
| tree | 8f7eb3fb512d79accb40320e79cfd08f1c877dfb /src/supplemental/http | |
| parent | 4dcfdd65318b706e139658842c9f406e906a8003 (diff) | |
| download | nng-8dc9a75d57111d635b413f7628bd0bc61352a3ff.tar.gz nng-8dc9a75d57111d635b413f7628bd0bc61352a3ff.tar.bz2 nng-8dc9a75d57111d635b413f7628bd0bc61352a3ff.zip | |
fixes #975 nng_http_res_alloc does not init status code properly
Diffstat (limited to 'src/supplemental/http')
| -rw-r--r-- | src/supplemental/http/http_msg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/supplemental/http/http_msg.c b/src/supplemental/http/http_msg.c index bcf6fc8e..9f5996ca 100644 --- a/src/supplemental/http/http_msg.c +++ b/src/supplemental/http/http_msg.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -118,7 +118,7 @@ nni_http_res_reset(nni_http_res *res) nni_strfree(res->vers); res->vers = NULL; res->rsn = NULL; - res->code = 0; + res->code = NNG_HTTP_STATUS_OK; res->parsed = false; nni_free(res->buf, res->bufsz); res->buf = NULL; @@ -655,7 +655,7 @@ nni_http_res_alloc(nni_http_res **resp) res->data.own = false; res->vers = NULL; res->rsn = NULL; - res->code = 0; + res->code = NNG_HTTP_STATUS_OK; *resp = res; return (0); } |
