Sun Java System Access Manager 7 2005Q4 C API Reference

am_http_cookie_decode()

URL decodes a HTTP cookie.

Syntax

#include "am_utls.h"
AM_EXPORT am_status_t
am_http_cookie_decode(const char *cookie, char *buf, int len);

Parameters

This function takes the following parameters:

Parameter

Description

cookie

The cookie to be URL decoded.

buf

The buffer to put the decoded cookie

len

The size of the buffer

Returns

This function returns am_status_t with one of the following values:

Value

Description

AM_SUCCESS

If the cookie was successfully decoded and copied into buf.

AM_INVALID_ARGUMENT

If the cookie or buffer was NULL or len was smaller than the size of the decoded value.

AM_FAILURE

Other error occurred while decoding cookie.