headerItemGetParameterNames

SYNOPSIS

varstrlst headerItemGetParameterNames(varchar headerItem)

Parameters:

  • headerItem - A varchar raw header item

Returns:

  • The varstrlst decoded list of parameter names


DESCRIPTION
The headerItemGetParameterNames function returns a unique list of parameter names in headerItem, which is a single raw (original encoded) header item (i.e. one item in a CSV list, if header value is CSV, e.g. email To header). The returned names are RFC 2047 encoded-word decoded.

Note that a shortcut function exists for mimeEntity objects, to obtain the header and parse it for parameters in one call; see mimeEntityGetHeaderParameterNames (here).


EXAMPLE

<$conType = 'text/html; charset="ISO-8859-1"; name="foo.html"'>
  <$ret = (headerItemGetParameterNames($conType))>
  Param names: <loop $ret> [$ret] </loop><fmt "\n">

The output would be:

Param names: [charset] [name]


CAVEATS
If the header being decoded is a potentially multi-item CSV list (e.g. "To" addresses), it should be split via headerGetItems (here) first.


SEE ALSO
headerItemGetParameterValues, mimeEntityGetHeaderParameterNames


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.