Helper function to decode a URI-escaped string or HTTP parameter.
If 'decode_plus' is 1, then we decode the string as an HTTP parameter
value, and convert all plus ('+') characters to spaces. If
'decode_plus' is 0, we leave all plus characters unchanged.
The returned string must be freed by the caller.
@param uri a URI-encode encoded URI
@param decode_plus determines whether we convert '+' to sapce.
@param size_out if size_out is not NULL, *size_out is set to the size of the
returned string
@return a newly allocated unencoded URI or NULL on failure
Helper function to decode a URI-escaped string or HTTP parameter.
If 'decode_plus' is 1, then we decode the string as an HTTP parameter value, and convert all plus ('+') characters to spaces. If 'decode_plus' is 0, we leave all plus characters unchanged.
The returned string must be freed by the caller.
@param uri a URI-encode encoded URI @param decode_plus determines whether we convert '+' to sapce. @param size_out if size_out is not NULL, *size_out is set to the size of the returned string @return a newly allocated unencoded URI or NULL on failure