#include "platform.h"
#include "microhttpd.h"
Go to the source code of this file.
Data Structures | |
struct | MHD_HTTP_Header |
struct | MHD_Response |
struct | MHD_Connection |
struct | MHD_Daemon |
Defines | |
#define | EXTRA_CHECKS MHD_YES |
#define | MHD_MAX(a, b) ((a)<(b)) ? (b) : (a) |
#define | MHD_MIN(a, b) ((a)<(b)) ? (a) : (b) |
#define | MHD_BUF_INC_SIZE 2048 |
#define | DEBUG_STATES MHD_NO |
#define | EXTRA_CHECK(a) |
Typedefs | |
typedef ssize_t(* | ReceiveCallback )(struct MHD_Connection *conn, void *write_to, size_t max_bytes) |
typedef ssize_t(* | TransmitCallback )(struct MHD_Connection *conn, const void *write_to, size_t max_bytes) |
typedef void *(* | LogCallback )(void *cls, const char *uri) |
Enumerations | |
enum | MHD_CONNECTION_STATE { MHD_CONNECTION_INIT = 0, MHD_CONNECTION_URL_RECEIVED = MHD_CONNECTION_INIT + 1, MHD_CONNECTION_HEADER_PART_RECEIVED = MHD_CONNECTION_URL_RECEIVED + 1, MHD_CONNECTION_HEADERS_RECEIVED = MHD_CONNECTION_HEADER_PART_RECEIVED + 1, MHD_CONNECTION_HEADERS_PROCESSED = MHD_CONNECTION_HEADERS_RECEIVED + 1, MHD_CONNECTION_CONTINUE_SENDING = MHD_CONNECTION_HEADERS_PROCESSED + 1, MHD_CONNECTION_CONTINUE_SENT = MHD_CONNECTION_CONTINUE_SENDING + 1, MHD_CONNECTION_BODY_RECEIVED = MHD_CONNECTION_CONTINUE_SENT + 1, MHD_CONNECTION_FOOTER_PART_RECEIVED = MHD_CONNECTION_BODY_RECEIVED + 1, MHD_CONNECTION_FOOTERS_RECEIVED = MHD_CONNECTION_FOOTER_PART_RECEIVED + 1, MHD_CONNECTION_HEADERS_SENDING = MHD_CONNECTION_FOOTERS_RECEIVED + 1, MHD_CONNECTION_HEADERS_SENT = MHD_CONNECTION_HEADERS_SENDING + 1, MHD_CONNECTION_NORMAL_BODY_READY = MHD_CONNECTION_HEADERS_SENT + 1, MHD_CONNECTION_NORMAL_BODY_UNREADY = MHD_CONNECTION_NORMAL_BODY_READY + 1, MHD_CONNECTION_CHUNKED_BODY_READY = MHD_CONNECTION_NORMAL_BODY_UNREADY + 1, MHD_CONNECTION_CHUNKED_BODY_UNREADY = MHD_CONNECTION_CHUNKED_BODY_READY + 1, MHD_CONNECTION_BODY_SENT = MHD_CONNECTION_CHUNKED_BODY_UNREADY + 1, MHD_CONNECTION_FOOTERS_SENDING = MHD_CONNECTION_BODY_SENT + 1, MHD_CONNECTION_FOOTERS_SENT = MHD_CONNECTION_FOOTERS_SENDING + 1, MHD_CONNECTION_CLOSED = MHD_CONNECTION_FOOTERS_SENT + 1, MHD_TLS_CONNECTION_INIT = MHD_CONNECTION_CLOSED + 1, MHD_TLS_HELLO_REQUEST, MHD_TLS_HANDSHAKE_FAILED, MHD_TLS_HANDSHAKE_COMPLETE } |
Functions | |
void | MHD_tls_log_func (int level, const char *str) |
size_t | MHD_http_unescape (char *val) |
Definition in file internal.h.
#define DEBUG_STATES MHD_NO |
Should all state transitions be printed to stderr?
Definition at line 319 of file internal.h.
#define EXTRA_CHECK | ( | a | ) |
Definition at line 769 of file internal.h.
Referenced by MHD_connection_get_fdset(), MHD_connection_handle_idle(), MHD_connection_handle_write(), process_broken_line(), transmit_error_response(), and try_ready_chunked_body().
#define EXTRA_CHECKS MHD_YES |
Definition at line 36 of file internal.h.
#define MHD_BUF_INC_SIZE 2048 |
Size by which MHD usually tries to increment read/write buffers. TODO: we should probably get rid of this magic constant and put in code to automatically determine a good value.
Definition at line 46 of file internal.h.
Referenced by get_next_header_line(), MHD_create_response_from_callback(), and try_grow_read_buffer().
#define MHD_MAX | ( | a, | |||
b | ) | ((a)<(b)) ? (b) : (a) |
Definition at line 38 of file internal.h.
#define MHD_MIN | ( | a, | |||
b | ) | ((a)<(b)) ? (a) : (b) |
typedef void*(* LogCallback)(void *cls, const char *uri) |
Definition at line 611 of file internal.h.
typedef ssize_t(* ReceiveCallback)(struct MHD_Connection *conn, void *write_to, size_t max_bytes) |
Function to receive plaintext data.
conn | the connection struct | |
write_to | where to write received data | |
max_bytes | maximum number of bytes to receive |
Definition at line 333 of file internal.h.
typedef ssize_t(* TransmitCallback)(struct MHD_Connection *conn, const void *write_to, size_t max_bytes) |
Function to transmit plaintext data.
conn | the connection struct | |
read_from | where to read data to transmit | |
max_bytes | maximum number of bytes to transmit |
Definition at line 345 of file internal.h.
enum MHD_CONNECTION_STATE |
States in a state machine for a connection.
Transitions are any-state to CLOSED, any state to state+1, FOOTERS_SENT to INIT. CLOSED is the terminal state and INIT the initial state.
Note that transitions for *reading* happen only after the input has been processed; transitions for *writing* happen after the respective data has been put into the write buffer (the write does not have to be completed yet). A transition to CLOSED or INIT requires the write to be complete.
Definition at line 182 of file internal.h.
size_t MHD_http_unescape | ( | char * | val | ) |
Process escape sequences ('+'=space, HH). Updates val in place.
Definition at line 122 of file internal.c.
References SSCANF.
Referenced by parse_arguments(), parse_initial_message_line(), and post_process_urlencoded().
void MHD_tls_log_func | ( | int | level, | |
const char * | str | |||
) |