NetSurf
|
#include <stdlib.h>
#include "utils/http.h"
#include "utils/http/challenge_internal.h"
#include "utils/http/generics.h"
#include "utils/http/parameter_internal.h"
#include "utils/http/primitives.h"
Go to the source code of this file.
Data Structures | |
struct | http_challenge |
Representation of an HTTP challenge. More... | |
Functions | |
static void | http_destroy_challenge (http_challenge *self) |
Destroy an HTTP challenge. More... | |
nserror | http__parse_challenge (const char **input, http_challenge **challenge) |
Parse an HTTP challenge. More... | |
const http_challenge * | http_challenge_list_iterate (const http_challenge *cur, lwc_string **scheme, http_parameter **parameters) |
Iterate over a challenge list. More... | |
void | http_challenge_list_destroy (http_challenge *list) |
Destroy a list of HTTP challenges. More... | |
nserror http__parse_challenge | ( | const char ** | input, |
http_challenge ** | challenge | ||
) |
Parse an HTTP challenge.
input | Pointer to current input byte. Updated on exit. |
challenge | Pointer to location to receive challenge |
The returned challenge is owned by the caller.
Definition at line 61 of file challenge.c.
References HTTP__ITEM_INIT, http__item_list_parse, http__parse_parameter(), http__parse_token(), http__skip_LWS(), http_destroy_challenge(), http_parameter_list_destroy(), NSERROR_NOMEM, NSERROR_NOT_FOUND, NSERROR_OK, and result.
Referenced by http_parse_www_authenticate().
void http_challenge_list_destroy | ( | http_challenge * | list | ) |
Destroy a list of HTTP challenges.
list | List to destroy |
Definition at line 136 of file challenge.c.
References http__item_list_destroy.
Referenced by http_parse_www_authenticate(), and http_www_authenticate_destroy().
const http_challenge * http_challenge_list_iterate | ( | const http_challenge * | cur, |
lwc_string ** | scheme, | ||
http_parameter ** | parameters | ||
) |
Iterate over a challenge list.
cur | Pointer to current iteration position, list head to start |
scheme | Pointer to location to receive challenge scheme |
parameters | Pointer to location to receive challenge parameters |
Definition at line 123 of file challenge.c.
References http_challenge::base, http__item::next, http_challenge::params, and http_challenge::scheme.
|
static |
Destroy an HTTP challenge.
self | Challenge to destroy |
Definition at line 43 of file challenge.c.
References http_parameter_list_destroy(), http_challenge::params, and http_challenge::scheme.
Referenced by http__parse_challenge().