NetSurf
Functions
primitives.h File Reference
#include <libwapcaplet/libwapcaplet.h>
#include "utils/errors.h"
Include dependency graph for primitives.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void http__skip_LWS (const char **input)
 Skip past linear whitespace in input. 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...
 

Function Documentation

◆ http__parse_quoted_string()

nserror http__parse_quoted_string ( const char **  input,
lwc_string **  value 
)

Parse an HTTP quoted-string.

Parameters
inputPointer to current input byte. Updated on exit.
valuePointer to location to receive on-heap string value.
Returns
NSERROR_OK on success, NSERROR_NOMEM on memory exhaustion, NSERROR_NOT_FOUND if no string could be parsed

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().

Here is the caller graph for this function:

◆ http__parse_token()

nserror http__parse_token ( const char **  input,
lwc_string **  value 
)

Parse an HTTP token.

Parameters
inputPointer to current input byte. Updated on exit.
valuePointer to location to receive on-heap token value.
Returns
NSERROR_OK on success, NSERROR_NOMEM on memory exhaustion, NSERROR_NOT_FOUND if no token could be parsed

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ http__skip_LWS()

void http__skip_LWS ( const char **  input)

Skip past linear whitespace in input.

Parameters
inputPointer 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().

Here is the caller graph for this function: