[nginx] Cleaned up r->headers_out.headers allocation error handling.
Maxim Dounin
mdounin at mdounin.ru
Mon Apr 24 16:42:10 UTC 2017
Hello!
On Mon, Apr 24, 2017 at 07:23:13PM +0300, Sorin Manole wrote:
> >> For the Cache-Control header, the fix is to postpone pushing
> >> r->headers_out.cache_control until its value is completed.
>
> Why not do the same thing for a bunch of other places like:
> ngx_http_auth_basic_set_realm
> ngx_http_range_not_satisfiable
>
> That is, for the latter, first initialize content_range, and then add it to
> headers.
> Looks like a safer strategy then rolling back a change in case of failure.
This was considered in earlier versions of the patch. The result
seems harder to read though, and also requires much more code
changes.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list