Re: [hackers] [quark][PATCH] Don't erase response on http_send_error_response

From: José Miguel Sánchez García <soy.jmi2k_AT_gmail.com>
Date: Sun, 25 Oct 2020 11:04:26 +0100

On 10/25/2020 8:39 AM, Laslo Hunhold wrote:

Dear Laslo,

> 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.

I'm currently relying on the req struct NOT being erased, because I'm
storing the realm the file belongs to there. Then, I'm using that realm
information to build the WWW-Authenticate header for the 401 error response.

I could just save that field before erasing everything else, but I
wonder if that's the way to go. If you are getting rid of everything,
maybe I shouldn't make exceptions?

Best regards,
José Miguel
Received on Sun Oct 25 2020 - 11:04:26 CET

This archive was generated by hypermail 2.3.0 : Sun Oct 25 2020 - 15:12:34 CET