Hello<br><br>I was trying to add some custom headers via add_header directive to webdav response and run into the problem: if response code was 201 (file created), then custom headers weren't added. The reason in that big if statement in ngx_http_headers_filter doesn't check for NGX_HTTP_CREATED. Is it intended behavior that custom headers aren't added to 201 responses?<br>
<br>If we want to add headers to any 2xx response, then why just don't change<br><div style="margin-left:40px;font-family:courier new,monospace">    if ((conf->expires == NGX_HTTP_EXPIRES_OFF && conf->headers == NULL)<br>
        || r != r->main<br>        || (r->headers_out.status != NGX_HTTP_OK<br>            && r->headers_out.status != NGX_HTTP_CREATED<br>            && r->headers_out.status != NGX_HTTP_NO_CONTENT<br>
            && r->headers_out.status != NGX_HTTP_PARTIAL_CONTENT<br>            && r->headers_out.status != NGX_HTTP_MOVED_PERMANENTLY<br>            && r->headers_out.status != NGX_HTTP_MOVED_TEMPORARILY<br>
            && r->headers_out.status != NGX_HTTP_SEE_OTHER<br>            && r->headers_out.status != NGX_HTTP_NOT_MODIFIED<br>            && r->headers_out.status != NGX_HTTP_TEMPORARY_REDIRECT))<br>
    {<br>        return ngx_http_next_header_filter(r);<br>    }<br></div>to<br><div style="margin-left:40px"><span style="font-family:courier new,monospace">    if ((conf->expires == NGX_HTTP_EXPIRES_OFF && conf->headers == NULL)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
        || r != r->main</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
        || r->headers_out.status / 100 != 2)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    {</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
        return ngx_http_next_header_filter(r);</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
    }</span><br>
</div><br>-- <br>Regards,<br>Dmitry<br>