Skip to content

Commit

Permalink
http: don't assume 200 status unless we actually exchange data
Browse files Browse the repository at this point in the history
This should simplify debugging in some circumstances.
  • Loading branch information
gdamore committed Dec 19, 2024
1 parent 2be02b1 commit 0d39d4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/supplemental/http/http_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ nni_http_res_reset(nni_http_res *res)
nni_strfree(res->vers);
res->vers = NULL;
res->rsn = NULL;
res->code = NNG_HTTP_STATUS_OK;
res->code = 0;
res->parsed = false;
nni_free(res->buf, res->bufsz);
res->buf = NULL;
Expand Down Expand Up @@ -666,7 +666,7 @@ nni_http_res_alloc(nni_http_res **resp)
res->data.own = false;
res->vers = NULL;
res->rsn = NULL;
res->code = NNG_HTTP_STATUS_OK;
res->code = 0;
*resp = res;
return (0);
}
Expand Down

0 comments on commit 0d39d4b

Please sign in to comment.