GNU libmicrohttpd 1.0.1
Loading...
Searching...
No Matches
MHD_PostProcessor Struct Reference

#include </builddir/build/BUILD/libmicrohttpd-1.0.1-build/libmicrohttpd-1.0.1/src/microhttpd/postprocessor.h>

Data Fields

struct MHD_Connectionconnection
 
MHD_PostDataIterator ikvi
 
void * cls
 
const char * encoding
 
const char * boundary
 
char * nested_boundary
 
char * content_name
 
char * content_type
 
char * content_filename
 
char * content_transfer_encoding
 
char xbuf [2]
 
size_t buffer_size
 
size_t buffer_pos
 
size_t xbuf_pos
 
uint64_t value_offset
 
size_t blen
 
size_t nlen
 
bool must_ikvi
 
bool must_unescape_key
 
enum PP_State state
 
enum RN_State skip_rn
 
enum PP_State dash_state
 
enum NE_State have
 

Detailed Description

Internal state of the post-processor. Note that the fields are sorted by type to enable optimal packing by the compiler.

Definition at line 114 of file postprocessor.h.

Field Documentation

◆ blen

size_t MHD_PostProcessor::blen

strlen(boundary) – if boundary != NULL.

Definition at line 196 of file postprocessor.h.

Referenced by find_boundary(), MHD_create_post_processor(), post_process_multipart(), and process_value_to_boundary().

◆ boundary

const char* MHD_PostProcessor::boundary

Primary boundary (points into encoding string)

Definition at line 141 of file postprocessor.h.

Referenced by find_boundary(), MHD_create_post_processor(), post_process_multipart(), and process_value_to_boundary().

◆ buffer_pos

size_t MHD_PostProcessor::buffer_pos

Current position in the key buffer.

Definition at line 181 of file postprocessor.h.

Referenced by find_boundary(), post_process_multipart(), post_process_urlencoded(), process_multipart_headers(), and process_value_to_boundary().

◆ buffer_size

size_t MHD_PostProcessor::buffer_size

◆ cls

void* MHD_PostProcessor::cls

Extra argument to ikvi.

Definition at line 131 of file postprocessor.h.

Referenced by MHD_create_post_processor(), process_value(), and process_value_to_boundary().

◆ connection

struct MHD_Connection* MHD_PostProcessor::connection

The connection for which we are doing POST processing.

Definition at line 121 of file postprocessor.h.

Referenced by MHD_create_post_processor().

◆ content_filename

char* MHD_PostProcessor::content_filename

Pointer to the (current) filename.

Definition at line 161 of file postprocessor.h.

Referenced by free_unmarked(), post_process_multipart(), process_multipart_headers(), and process_value_to_boundary().

◆ content_name

char* MHD_PostProcessor::content_name

Pointer to the name given in disposition.

Definition at line 151 of file postprocessor.h.

Referenced by free_unmarked(), post_process_multipart(), process_multipart_headers(), and process_value_to_boundary().

◆ content_transfer_encoding

char* MHD_PostProcessor::content_transfer_encoding

Pointer to the (current) encoding.

Definition at line 166 of file postprocessor.h.

Referenced by free_unmarked(), post_process_multipart(), process_multipart_headers(), and process_value_to_boundary().

◆ content_type

char* MHD_PostProcessor::content_type

Pointer to the (current) content type.

Definition at line 156 of file postprocessor.h.

Referenced by free_unmarked(), post_process_multipart(), process_multipart_headers(), and process_value_to_boundary().

◆ dash_state

enum PP_State MHD_PostProcessor::dash_state

If we are in skip_rn with "dash" mode and do find 2 dashes, what state do we go into?

Definition at line 236 of file postprocessor.h.

Referenced by find_boundary(), post_process_multipart(), and process_value_to_boundary().

◆ encoding

const char* MHD_PostProcessor::encoding

Encoding as given by the headers of the connection.

Definition at line 136 of file postprocessor.h.

Referenced by MHD_create_post_processor(), and MHD_post_process().

◆ have

enum NE_State MHD_PostProcessor::have

Which headers are global? (used to tell which headers were only valid for the nested multipart).

Definition at line 242 of file postprocessor.h.

Referenced by free_unmarked(), MHD_destroy_post_processor(), and post_process_multipart().

◆ ikvi

MHD_PostDataIterator MHD_PostProcessor::ikvi

Function to call with POST data.

Definition at line 126 of file postprocessor.h.

Referenced by MHD_create_post_processor(), process_value(), and process_value_to_boundary().

◆ must_ikvi

bool MHD_PostProcessor::must_ikvi

Do we have to call the 'ikvi' callback when processing the multipart post body even if the size of the payload is zero? Set to MHD_YES whenever we parse a new multiparty entry header, and to MHD_NO the first time we call the 'ikvi' callback. Used to ensure that we do always call 'ikvi' even if the payload is empty (but not more than once).

Definition at line 211 of file postprocessor.h.

Referenced by post_process_multipart(), post_process_urlencoded(), process_value(), and process_value_to_boundary().

◆ must_unescape_key

bool MHD_PostProcessor::must_unescape_key

Set if we still need to run the unescape logic on the key allocated at the end of this struct.

Definition at line 217 of file postprocessor.h.

Referenced by post_process_urlencoded().

◆ nested_boundary

char* MHD_PostProcessor::nested_boundary

Nested boundary (if we have multipart/mixed encoding).

Definition at line 146 of file postprocessor.h.

Referenced by MHD_destroy_post_processor(), and post_process_multipart().

◆ nlen

size_t MHD_PostProcessor::nlen

strlen(nested_boundary) – if nested_boundary != NULL.

Definition at line 201 of file postprocessor.h.

Referenced by post_process_multipart().

◆ skip_rn

enum RN_State MHD_PostProcessor::skip_rn

Side-state-machine: skip CRLF (or just LF). Set to 0 if we are not in skip mode. Set to 2 if a CRLF is expected, set to 1 if a CR should be skipped if it is the next character.

Definition at line 230 of file postprocessor.h.

Referenced by find_boundary(), MHD_create_post_processor(), post_process_multipart(), process_multipart_headers(), and process_value_to_boundary().

◆ state

◆ value_offset

uint64_t MHD_PostProcessor::value_offset

Current offset in the value being processed.

Definition at line 191 of file postprocessor.h.

Referenced by post_process_multipart(), post_process_urlencoded(), process_value(), and process_value_to_boundary().

◆ xbuf

char MHD_PostProcessor::xbuf[2]

Value data left over from previous iteration.

Definition at line 171 of file postprocessor.h.

Referenced by process_value().

◆ xbuf_pos

size_t MHD_PostProcessor::xbuf_pos

Current position in xbuf.

Definition at line 186 of file postprocessor.h.

Referenced by MHD_destroy_post_processor(), and process_value().


The documentation for this struct was generated from the following file: