Embedded TCP/IP stack  4.7.0

◆ fnet_http_srv_query_unencode()

void fnet_http_srv_query_unencode ( fnet_uint8_t *  dest,
fnet_uint8_t *  src 
)

Converts escaped string to an original format.

Parameters
destDestination string.
srcSource string.

This function converts encoded string to the original format. The '+' symbol is replaced by the space symbol, and the % symbol followed by two hexadecimal digits is replaced by proper ASCII value (for example the exclamation mark encoded as %21).
This function should be used by CGI functions to eliminate escape symbols from a query string.

INFO:
RFC1945:The Request-URI is transmitted as an encoded string, where some characters may be escaped using the "% HEX HEX" encoding defined by RFC 1738. The origin server must decode the Request-URI in order to properly interpret the request.


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net