nginx-modules / ngx_cache_purge

nginx module which support to purge ngx_http_(fastcgi|proxy|scgi|uwsgi)_module cache backend
Other
209 stars 34 forks source link

Fix cplcf->conf->purge_all causing segmentation fault #8

Closed machadovilaca closed 7 years ago

machadovilaca commented 7 years ago

Segmentation Fault when trying to purge all the content from nginx cache. cplcf->conf value was 0x0. Fixed by changing cplcf structure field accessed to cplcf->fastcgi.purge_all.

denji commented 7 years ago

@machadovilaca (ngx_(http_proxy_cache,http_scgi_cache,http_uwsgi_cache,http_cache,)_purge_handler) -> cplcf->fastcgi.purge_all?

machadovilaca commented 7 years ago

@denji ohhh...I was fixing the error specifically for a fastcgi cache configuration and I generalized the solution for all different types. I will review the code and correct it accordingly.

machadovilaca commented 7 years ago

Ok, I reviewed the code, and changed proxy,scgi and uwsgi. BTW in ngx_http_cache_purge_handler function I was not able to avoid using else ifs to fix my segmentation fault error.

denji commented 7 years ago

Resolved nginx-modules/ngx_cache_purge#9