NetSurf
|
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "netsurf/inttypes.h"
#include "utils/http/primitives.h"
Go to the source code of this file.
Functions | |
void | http__skip_LWS (const char **input) |
Skip past linear whitespace in input. More... | |
static bool | http_is_token_char (uint8_t c) |
Determine if a character is valid for an HTTP token. More... | |
nserror | http__parse_token (const char **input, lwc_string **value) |
Parse an HTTP token. More... | |
nserror | http__parse_quoted_string (const char **input, lwc_string **value) |
Parse an HTTP quoted-string. More... | |
nserror http__parse_quoted_string | ( | const char ** | input, |
lwc_string ** | value | ||
) |
Parse an HTTP quoted-string.
input | Pointer to current input byte. Updated on exit. |
value | Pointer to location to receive on-heap string value. |
The returned value is owned by the caller
Definition at line 102 of file primitives.c.
References NSERROR_NOMEM, NSERROR_NOT_FOUND, and NSERROR_OK.
Referenced by http__parse_directive(), and http__parse_parameter().
nserror http__parse_token | ( | const char ** | input, |
lwc_string ** | value | ||
) |
Parse an HTTP token.
input | Pointer to current input byte. Updated on exit. |
value | Pointer to location to receive on-heap token value. |
The returned value is owned by the caller
Definition at line 68 of file primitives.c.
References http_is_token_char(), NSERROR_NOMEM, NSERROR_NOT_FOUND, and NSERROR_OK.
Referenced by http__parse_challenge(), http__parse_directive(), http__parse_parameter(), http_parse_content_disposition(), and http_parse_content_type().
void http__skip_LWS | ( | const char ** | input | ) |
Skip past linear whitespace in input.
input | Pointer to current input byte. Updated on exit. |
Definition at line 31 of file primitives.c.
Referenced by http___item_list_parse(), http__parse_challenge(), http__parse_directive(), http__parse_parameter(), http_parse_cache_control(), http_parse_content_disposition(), http_parse_content_type(), http_parse_strict_transport_security(), and http_parse_www_authenticate().
|
static |
Determine if a character is valid for an HTTP token.
c | Character to consider |
Definition at line 47 of file primitives.c.
Referenced by http__parse_token().