Open gary8520 opened 11 months ago
this change can fix the following test case by the luajit 2.0.5
self.request.headers.http_parser_url = nil
print("[Debug] url field:", self.request.headers:get_url_field(turbo.httputil.UF.PATH))
collectgarbage("collect")
print("[Debug] url field:", self.request.headers:get_url_field(turbo.httputil.UF.PATH))
before adding this change, the second print cannot get the value since the data seems to be freed by lua GC.
@kernelsauce is there any comment about the PR?
luajit may manage
http_parser_url
struct directly instead of managing astruct http_parser_url *
and a block ofstruct http_parser_url
instance.