Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
KHTTP_URLDECODE(3)	    Library Functions Manual	    KHTTP_URLDECODE(3)

NAME
       khttp_urldecode,	khttp_urldecode_inplace	-- URL decoding	for kcgi

LIBRARY
       library "libkcgi"

SYNOPSIS
       #include	<sys/types.h>
       #include	<stdarg.h>
       #include	<stdint.h>
       #include	<kcgi.h>

       enum kcgi_err
       khttp_urldecode(const char *src,	char **dst);

       enum kcgi_err
       khttp_urldecode_inplace(char *src);

DESCRIPTION
       Decode  the  percent-encoded string src.	 In khttp_urldecode(), the re-
       sult is placed in dst.  In khttp_urldecode_inplace(), the input	string
       src  is	overwritten with the result, which will	be the same or shorter
       in length.

       These accept uppercase and lowercase  percent  encoding,	 for  example.
       "%A0" or	"%a0", respectively.

       The   deprecated	  form	 of  these  functions,	kutil_urldecode()  and
       kutil_urldecode_inplace(), should no longer be used.

RETURN VALUES
       khttp_urldecode() and khttp_urldecode_inplace() return an error code:

       KCGI_OK
	    Success (not an error).

       KCGI_ENOMEM
	    Memory failure (only khttp_urldecode()).

       KCGI_FORM
	    Malformed input or NULL src	or dst arguments.

       If khttp_urldecode() returns an error, it  always  sets	dst  to	 NULL.
       khttp_urldecode_inplace(),   however,  may  leave  a  partially-decoded
       string in src.

AUTHORS
       Written by Kristaps Dzonsons <kristaps@bsd.lv>.

FreeBSD	Ports 14.quarterly	  $Mdocdate$		    KHTTP_URLDECODE(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=khttp_urldecode&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help