On Sat, 24 Oct 2020 16:19:13 +0000
José Miguel Sánchez García <[email protected]> wrote:

Dear José,

thanks for taking your time reading the code and reporting this!

> The comment before the offending line indicated it was intended to
> only erase the fields, but it erased the whole response. It was most
> likely a bug.
>
>       /* empty all fields */
> -     memset(req, 0, sizeof(*req));
> +     memset(&(req->fields), 0, sizeof(req->fields));

No, this is supposed to be like this. I agree that the comment is a bit
misleading, but http_parse_header() really builds a request from
scratch and first sets it all to zero. With "fields" I'm referring to
the struct fields in request, and this misleading comment will be fixed
in an upcoming commit.

With best regards

Laslo

Reply via email to