NetSurf
Data Structures | Typedefs | Functions
content-type.h File Reference
#include <libwapcaplet/libwapcaplet.h>
#include "utils/http/parameter.h"
Include dependency graph for content-type.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  http_content_type
 

Typedefs

typedef struct http_content_type http_content_type
 

Functions

nserror http_parse_content_type (const char *header_value, http_content_type **result)
 Parse an HTTP Content-Type header value. More...
 
void http_content_type_destroy (http_content_type *victim)
 Destroy a content type object. More...
 

Typedef Documentation

◆ http_content_type

Function Documentation

◆ http_content_type_destroy()

void http_content_type_destroy ( http_content_type victim)

Destroy a content type object.

Parameters
victimObject to destroy

Definition at line 122 of file content-type.c.

References http_parameter_list_destroy(), http_content_type::media_type, and http_content_type::parameters.

Referenced by content_factory_create_content(), download_context_process_headers(), and mimesniff_compute_effective_type().

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

◆ http_parse_content_type()

nserror http_parse_content_type ( const char *  header_value,
http_content_type **  result 
)

Parse an HTTP Content-Type header value.

Parameters
header_valueHeader value to parse
resultPointer to location to receive result
Returns
NSERROR_OK on success, NSERROR_NOMEM on memory exhaustion

Definition at line 30 of file content-type.c.

References http__item_list_parse, http__parse_parameter(), http__parse_token(), http__skip_LWS(), http_parameter_list_destroy(), http_content_type::media_type, NSERROR_NOMEM, NSERROR_NOT_FOUND, NSERROR_OK, http_content_type::parameters, result, and type.

Referenced by content_factory_create_content(), download_context_process_headers(), and mimesniff_compute_effective_type().

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