33 const char *pos = *input;
35 while (*pos ==
' ' || *pos ==
'\t')
51 if (c <=
' ' || 126 < c)
54 return (strchr(
"()<>@,;:\\\"/[]?={}", c) == NULL);
70 const uint8_t *start = (
const uint8_t *) *input;
81 if (lwc_intern_string((
const char *) start,
82 end - start, &token) != lwc_error_ok)
86 *input = (
const char *) end;
104 const uint8_t *start = (
const uint8_t *) *input;
107 lwc_string *string_value;
122 end = start = start + 1;
125 while (c ==
'\t' || c ==
'\r' || c ==
'\n' ||
126 c ==
' ' || c ==
'!' ||
127 (
'#' <= c && c <= 126) || c > 127) {
135 if (lwc_intern_string((
const char *) start, end - start,
136 &string_value) != lwc_error_ok)
139 *value = string_value;
141 *input = (
const char *) end + 1;
nserror
Enumeration of error codes.
@ NSERROR_NOT_FOUND
Requested item not found.
@ NSERROR_NOMEM
Memory exhaustion.
Netsurf additional integer type formatting macros.
nserror http__parse_token(const char **input, lwc_string **value)
Parse an HTTP token.
static bool http_is_token_char(uint8_t c)
Determine if a character is valid for 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.