Re: string duplicate

2016-10-21 Thread Valentin V. Bartenev
On Friday 21 October 2016 11:17:40 Mathieu Vachon wrote: > Hi there, > > Despite reading the api manual, i cant seem to find a function to duplicate > a ngx_str_t to another. > > Did i miss it , or have to roll my own duplicate stuff ? > ngx_pstrdup()? wbr, Valentin V. Bartenev

Re: string duplicate

2016-10-21 Thread Mathieu Vachon
I found this on the web : static ngx_str_t* ngx_http_uploadprogress_strdup(ngx_str_t *src, ngx_log_t * log) { ngx_str_t *dst; dst = ngx_alloc(src->len + sizeof(ngx_str_t), log); if (dst == NULL) { return NULL; } dst->len = src->len; ngx_memcpy(((char*)dst + sizeof

string duplicate

2016-10-21 Thread Mathieu Vachon
Hi there, Despite reading the api manual, i cant seem to find a function to duplicate a ngx_str_t to another. Did i miss it , or have to roll my own duplicate stuff ? -Mathieu ___ nginx-devel mailing list [email protected] http://mailman.nginx.org/