ngx_cpystrn() description say that function "Copies information from one memory location to another. Stops when n bytes are copied" (https://www.nginx.com/resources/wiki/extending/api/utility/) But in fact it copies n-1 byte(src/core/ngx_string.c): " while (--n) { *dst = *src; " Please, fix (documentation).by mangup - Other discussion