Sun Java System Access Manager 7 2005Q4 C API Reference

am_http_cookie_encode()

URL encodes a HTTP cookie.

Syntax

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

Parameters

This function takes the following parameters:

Parameter

Description

cookie

The cookie to be URL encoded.

buf

The buffer to put the encoded 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 encoded and copied into buf.

AM_INVALID_ARGUMENT

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

AM_FAILURE

Other error occurred while encoding cookie.