ngx_unescape_uri do not unescape char '+'

Ranier ranier at cultura.com.br
Wed Jan 19 19:03:46 MSK 2011


Hi,
ngx_unescape_uri dot not unescape '+' char in r->header_in->pos?

See below:

<code>
ngx_int_t
ngx_http_unescape_post_args(ngx_http_request_t *r)
{
     u_char    *dst;
     u_char    *src;
     ngx_uint_t len;

     if (r->header_in == NULL) {
        return NGX_ERROR;
     } else if (r->header_in->pos == r->header_in->last) {
        return NGX_ERROR;
     }

     len = (r->header_in->last - r->header_in->pos);
     dst = r->header_in->pos;
     src = r->header_in->pos;
     ngx_unescape_uri(&dst, &src, len, NGX_UNESCAPE_URI);

     return NGX_OK;
}
</code>

Thanks a lot.

Ranier Vilela



More information about the nginx-devel mailing list