45 lwc_string_unref(self->
name);
46 lwc_string_unref(self->
value);
63 const char *pos = *input;
78 lwc_string_unref(name);
92 lwc_string_unref(name);
96 param = malloc(
sizeof(*param));
98 lwc_string_unref(value);
99 lwc_string_unref(name);
105 param->
value = value;
115 lwc_string *name, lwc_string **value)
119 while (list != NULL) {
120 if (lwc_string_caseless_isequal(name, list->
name,
121 &match) == lwc_error_ok && match)
130 *value = lwc_string_ref(list->
value);
137 lwc_string **name, lwc_string **value)
142 *name = lwc_string_ref(cur->
name);
143 *value = lwc_string_ref(cur->
value);
nserror
Enumeration of error codes.
@ NSERROR_NOT_FOUND
Requested item not found.
@ NSERROR_NOMEM
Memory exhaustion.
#define http__item_list_destroy(l)
#define HTTP__ITEM_INIT(item, n, f)
HTTP header parsing functions.
void http_parameter_list_destroy(http_parameter *list)
Destroy a list of HTTP parameters.
const http_parameter * http_parameter_list_iterate(const http_parameter *cur, lwc_string **name, lwc_string **value)
Iterate over a parameter list.
nserror http_parameter_list_find_item(const http_parameter *list, lwc_string *name, lwc_string **value)
Find a named item in an HTTP parameter list.
static void http_destroy_parameter(http_parameter *self)
Destructor for an HTTP parameter.
nserror http__parse_parameter(const char **input, http_parameter **parameter)
Parse an HTTP parameter.
nserror http__parse_token(const char **input, lwc_string **value)
Parse an HTTP token.
void http__skip_LWS(const char **input)
Skip past linear whitespace in input.
nserror http__parse_quoted_string(const char **input, lwc_string **value)
Parse an HTTP quoted-string.
Interface to utility string handling.
Representation of an item.
struct http__item * next
Next item in list, or NULL.
Representation of an HTTP parameter.
lwc_string * name
Parameter name.
lwc_string * value
Parameter value.