[PATCH] Do not break downstream connection on proxy_cache write error

Maxim Dounin mdounin at mdounin.ru
Mon May 9 15:16:11 UTC 2022


Hello!

On Mon, May 09, 2022 at 04:12:40PM +0300, Kipras wrote:

[...]

> P.S. if i could ask - what does the p->cacheable flag mean?

It basically means "save the whole to response to the temporary 
file, it will be used for caching/store".  Note well that as of 
now, it is only set at the very start of the event pipe operation, 
when initializing u->pipe in ngx_http_upstream_send_response(), 
and it might not be safe to simply switch it off at some point.

> The
> ngx_event_pipe_t
> struct is not documented in
> http://nginx.org/en/docs/dev/development_guide.html
> and it is kinda hard to understand all the pipes/buffers and the buffer
> shadowing mechanism/purpose just from reading the code :)

The code is basically the only documentation available about the 
code (history and commit logs might be also helpful).  The 
development guide is mostly about explaining some basic things, 
and it is focused on how to write modules, not on explaining how 
existing modules work.  If you want to change the existing code, 
you'll have to read the code carefully to understand what the code 
does.

-- 
Maxim Dounin
http://mdounin.ru/



More information about the nginx-devel mailing list