ngrest nginx module - mod_ngrest_to_cstring

22 views
Skip to first unread message

Hadi Rezaee

unread,
May 22, 2019, 6:50:33 PM5/22/19
to ngrest
Hello!

During the build of 'mod_ngrest' I got several warnings mostly about converting u_char* to char* , and it seems it was actually planned :

static char* mod_ngrest_to_cstring(const ngx_str_t* str, ngx_pool_t* pool)
{
   
char* res = ngx_pcalloc(pool, str->len + 1);
    strncpy
(res, str->data, str->len);
    str
->data[str->len] = '\0';
   
return res;
}


That makes me wonder if this design doesnt break the multi-byte / unicode requests. and if we could probably keep u_char universal in all part of the project ?
Can somebody elaborate about this ?

Thanks. 
Reply all
Reply to author
Forward
0 new messages