GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KHTTP_URLDECODE(3) FreeBSD Library Functions Manual KHTTP_URLDECODE(3)

khttp_urldecode, khttp_urldecode_inplace
URL decoding for kcgi

library “libkcgi”

#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);

Decode the percent-encoded string src. In khttp_urldecode(), the result 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.

khttp_urldecode() and khttp_urldecode_inplace() return an error code:
Success (not an error).
Memory failure (only khttp_urldecode()).
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.

Written by Kristaps Dzonsons <kristaps@bsd.lv>.
June 12, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.