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
