Add the
khttp_urlpart(3) family
to replace the now-deprecated
kutil_urlpart
functions.
These are for the most part a re-name of the old functions that
remove the unused
struct kreq
argument.
There are some small behaviour changes from the original in corner
case usage: they have an empty suffix (not just
NULL
)
inhibit printing the dot-suffix, allow a
NULL
page, and
have an empty or
NULL
page also inhibit the suffix.
This way, these functions only produce valid URLs, and also allow
for some previously-disallowed (but valid) forms such as
/?foo=bar
.
The previous functions have been retained with the original
behaviour with one exception: before, an empty
suffix would still print the period separator. Now, this is
suppressed.
The khttp_vurlpart
and khttp_vurlpartx
forms, which accept a variable-length type, are also now exposed for
use.
Add the
khttp_urlabs(3) function,
which is similar to the earlier
kutil_urlabs
but
significantly more robust and accepts query string arguments.
The earlier
kutil_urlabs
is retained, but deprecated.
Add
khttp_urlencode(3) and
khttp_urldecode(3),
replacing the legacy
kutil_urlencode
and
kutil_urldecode
. They're identical
except in how
NULL
values are handled, in the first
case returning them as empty strings instead of
NULL
,
in the second regarding them as errors.
For the encoder, this allows all URL formatting tools to pass
NULL
values as query string values without errors.
The earlier functions have been retained with the original behaviour
with one exception, in that a
NULL
destination argument for
kutil_urldecode
triggers a
KCGI_FORM
return.
Verify and fix that all scope-opening functions in
kcgixml(3) and
kcgihtml(3)
properly close variable arguments contexts on error.
Behaviour change: previously, several
kcgixml(3) functions would return
KCGI_FORM
, such as when popping from an empty stack.
To prevent other
KCGI_FORM
errors from being masked,
use
KCGI_WRITER
to handle these situations.
Split apart
kcgixml(3) into one manpage
per function.