GNU libmicrohttpd
0.9.65
|
#include </builddir/build/BUILD/libmicrohttpd-0.9.65/src/lib/internal.h>
Data Fields | |
struct MHD_Daemon * | daemon |
struct MHD_Connection * | connection |
struct MHD_Response * | response |
struct MHD_HTTP_Header * | headers_received |
struct MHD_HTTP_Header * | headers_received_tail |
void * | client_context |
char * | method_s |
const char * | url |
char * | version_s |
enum MHD_ConnKeepAlive | keepalive |
char * | read_buffer |
char * | write_buffer |
char * | last |
char * | colon |
size_t | read_buffer_size |
size_t | read_buffer_offset |
size_t | write_buffer_size |
size_t | write_buffer_send_offset |
size_t | write_buffer_append_offset |
size_t | header_size |
uint64_t | remaining_upload_size |
uint64_t | current_chunk_size |
uint64_t | current_chunk_offset |
uint64_t | response_write_position |
size_t | continue_message_write_offset |
enum MHD_REQUEST_STATE | state |
enum MHD_Method | method |
enum MHD_RequestEventLoopInfo | event_loop_info |
bool | in_idle |
bool | in_cleanup |
bool | have_chunked_upload |
State kept for each HTTP request.
Definition at line 363 of file internal.h.
void* MHD_Request::client_context |
We allow the main application to associate some pointer with the HTTP request, which is passed to each MHD_AccessHandlerCallback and some other API calls. Here is where we store it. (MHD does not know or care what it is).
Definition at line 398 of file internal.h.
Referenced by MHD_request_get_information_sz(), MHD_request_handle_idle_(), MHD_resume_suspended_connections_(), parse_initial_message_line(), process_request_body(), and thread_main_handle_connection().
char* MHD_Request::colon |
Position after the colon on the last incomplete header line during parsing of headers. Allocated in pool. Only valid if state is either MHD_REQUEST_HEADER_PART_RECEIVED or MHD_REQUEST_FOOTER_PART_RECEIVED.
Definition at line 453 of file internal.h.
Referenced by MHD_request_handle_idle_(), process_broken_line(), and process_header_line().
struct MHD_Connection* MHD_Request::connection |
Connection this request is associated with.
Definition at line 374 of file internal.h.
Referenced by build_header_response(), call_request_handler(), check_write_done(), connection_update_event_loop_info(), MHD_request_get_information_sz(), MHD_request_handle_idle_(), MHD_request_handle_read_(), MHD_request_handle_write_(), MHD_request_resume(), MHD_request_set_value(), parse_cookie_header(), parse_request_headers(), process_broken_line(), process_header_line(), process_request_body(), response_action(), suspend_action(), transmit_error_response(), try_grow_read_buffer(), try_ready_chunked_body(), and try_ready_normal_body().
size_t MHD_Request::continue_message_write_offset |
Position in the 100 CONTINUE message that we need to send when receiving http 1.1 requests.
Definition at line 541 of file internal.h.
Referenced by MHD_request_handle_idle_(), MHD_request_handle_write_(), and need_100_continue().
uint64_t MHD_Request::current_chunk_offset |
If we are receiving with chunked encoding, where are we currently with respect to the current chunk (at what offset / position)?
Definition at line 519 of file internal.h.
Referenced by process_request_body().
uint64_t MHD_Request::current_chunk_size |
If we are receiving with chunked encoding, where are we right now? Set to 0 if we are waiting to receive the chunk size; otherwise, this is the size of the current chunk. A value of zero is also used when we're at the end of the chunks.
Definition at line 513 of file internal.h.
Referenced by process_request_body().
struct MHD_Daemon* MHD_Request::daemon |
Reference to the struct MHD_Daemon
.
Definition at line 369 of file internal.h.
Referenced by build_header_response(), call_request_handler(), MHD_parse_arguments_(), MHD_request_handle_idle_(), MHD_request_handle_read_(), MHD_request_handle_write_(), MHD_request_resume(), parse_cookie_header(), parse_initial_message_line(), parse_request_headers(), process_header_line(), process_request_body(), request_add_header(), response_action(), transmit_error_response(), try_grow_read_buffer(), and try_ready_chunked_body().
enum MHD_RequestEventLoopInfo MHD_Request::event_loop_info |
What is this request waiting for?
Definition at line 556 of file internal.h.
Referenced by connection_update_event_loop_info(), internal_get_fdset2(), MHD_connection_call_handlers_(), MHD_connection_mark_closed_(), and thread_main_handle_connection().
bool MHD_Request::have_chunked_upload |
Are we receiving with chunked encoding? This will be set to MHD_YES after we parse the headers and are processing the body with chunks. After we are done with the body and we are processing the footers; once the footers are also done, this will be set to MHD_NO again (before the final call to the handler).
Definition at line 577 of file internal.h.
Referenced by build_header_response(), MHD_request_handle_idle_(), parse_request_headers(), and process_request_body().
size_t MHD_Request::header_size |
Number of bytes we had in the HTTP header, set once we pass MHD_REQUEST_HEADERS_RECEIVED.
Definition at line 499 of file internal.h.
Referenced by MHD_request_get_information_sz(), and MHD_request_handle_idle_().
struct MHD_HTTP_Header* MHD_Request::headers_received |
Linked list of parsed headers.
Definition at line 385 of file internal.h.
Referenced by MHD_lookup_header_token_ci(), MHD_request_get_values(), MHD_request_lookup_value(), and MHD_request_set_value().
struct MHD_HTTP_Header* MHD_Request::headers_received_tail |
Tail of linked list of parsed headers.
Definition at line 390 of file internal.h.
Referenced by MHD_request_set_value().
bool MHD_Request::in_cleanup |
Are we currently inside the "idle" handler (to avoid recursively invoking it).
Definition at line 568 of file internal.h.
Referenced by cleanup_connection().
bool MHD_Request::in_idle |
Are we currently inside the "idle" handler (to avoid recursively invoking it).
Definition at line 562 of file internal.h.
Referenced by cleanup_connection(), MHD_request_handle_idle_(), and response_action().
enum MHD_ConnKeepAlive MHD_Request::keepalive |
Close connection after sending response? Functions may change value from "Unknown" or "KeepAlive" to "Must close", but no functions reset value "Must Close" to any other value.
Definition at line 423 of file internal.h.
Referenced by build_header_response(), keepalive_possible(), MHD_request_handle_idle_(), and transmit_error_response().
char* MHD_Request::last |
Last incomplete header line during parsing of headers. Allocated in pool. Only valid if state is either MHD_REQUEST_HEADER_PART_RECEIVED or MHD_REQUEST_FOOTER_PART_RECEIVED.
Definition at line 444 of file internal.h.
Referenced by MHD_request_handle_idle_(), process_broken_line(), and process_header_line().
enum MHD_Method MHD_Request::method |
HTTP method, as an enum.
Definition at line 551 of file internal.h.
Referenced by build_header_response(), call_request_handler(), MHD_request_handle_idle_(), parse_initial_message_line(), process_request_body(), and response_action().
char* MHD_Request::method_s |
Request method as string. Should be GET/POST/etc. Allocated in pool.
Definition at line 404 of file internal.h.
Referenced by MHD_request_get_information_sz(), and parse_initial_message_line().
char* MHD_Request::read_buffer |
Buffer for reading requests. Allocated in pool. Actually one byte larger than read_buffer_size (if non-NULL) to allow for 0-termination.
Definition at line 430 of file internal.h.
Referenced by get_next_header_line(), MHD_request_handle_idle_(), MHD_request_handle_read_(), process_request_body(), and try_grow_read_buffer().
size_t MHD_Request::read_buffer_offset |
Position where we currently append data in read_buffer (last valid position).
Definition at line 477 of file internal.h.
Referenced by connection_update_event_loop_info(), get_next_header_line(), MHD_request_handle_idle_(), MHD_request_handle_read_(), and process_request_body().
size_t MHD_Request::read_buffer_size |
Size of read_buffer (in bytes). This value indicates how many bytes we're willing to read into the buffer; the real buffer is one byte longer to allow for adding zero-termination (when needed).
Definition at line 471 of file internal.h.
Referenced by connection_update_event_loop_info(), get_next_header_line(), MHD_request_handle_idle_(), MHD_request_handle_read_(), and try_grow_read_buffer().
uint64_t MHD_Request::remaining_upload_size |
How many more bytes of the body do we expect to read? MHD_SIZE_UNKNOWN for unknown.
Definition at line 505 of file internal.h.
Referenced by MHD_request_handle_idle_(), parse_request_headers(), and process_request_body().
struct MHD_Response* MHD_Request::response |
Response to return for this request, set once it is available.
Definition at line 380 of file internal.h.
Referenced by build_header_response(), call_request_handler(), cleanup_connection(), keepalive_possible(), MHD_connection_cleanup_(), MHD_connection_close_(), MHD_request_handle_idle_(), MHD_request_handle_write_(), MHD_resume_suspended_connections_(), need_100_continue(), parse_request_headers(), process_request_body(), response_action(), thread_main_handle_connection(), transmit_error_response(), try_ready_chunked_body(), and try_ready_normal_body().
uint64_t MHD_Request::response_write_position |
Current write position in the actual response (excluding headers, content only; should be 0 while sending headers).
Definition at line 526 of file internal.h.
Referenced by MHD_request_handle_idle_(), MHD_request_handle_write_(), response_action(), try_ready_chunked_body(), and try_ready_normal_body().
enum MHD_REQUEST_STATE MHD_Request::state |
State in the FSM for this request.
Definition at line 546 of file internal.h.
Referenced by build_header_response(), check_write_done(), connection_update_event_loop_info(), MHD_connection_call_handlers_(), MHD_connection_mark_closed_(), MHD_request_get_information_sz(), MHD_request_handle_idle_(), MHD_request_handle_read_(), MHD_request_handle_write_(), parse_request_headers(), recv_param_adapter(), response_action(), send_param_adapter(), thread_main_handle_connection(), transmit_error_response(), try_ready_chunked_body(), and try_ready_normal_body().
const char* MHD_Request::url |
Requested URL (everything after "GET" only). Allocated in pool.
Definition at line 410 of file internal.h.
Referenced by call_request_handler(), connection_update_event_loop_info(), get_next_header_line(), MHD_request_handle_write_(), parse_initial_message_line(), and process_request_body().
char* MHD_Request::version_s |
HTTP version string (i.e. http/1.1). Allocated in pool.
Definition at line 416 of file internal.h.
Referenced by build_header_response(), keepalive_possible(), MHD_request_get_information_sz(), MHD_request_handle_idle_(), need_100_continue(), parse_initial_message_line(), parse_request_headers(), and transmit_error_response().
char* MHD_Request::write_buffer |
Buffer for writing response (headers only). Allocated in pool.
Definition at line 436 of file internal.h.
Referenced by build_header_response(), check_write_done(), MHD_request_handle_write_(), and try_ready_chunked_body().
size_t MHD_Request::write_buffer_append_offset |
Last valid location in write_buffer (where do we append and up to where is it safe to send?)
Definition at line 493 of file internal.h.
Referenced by build_header_response(), check_write_done(), MHD_request_handle_idle_(), MHD_request_handle_write_(), and try_ready_chunked_body().
size_t MHD_Request::write_buffer_send_offset |
Offset where we are with sending from write_buffer.
Definition at line 487 of file internal.h.
Referenced by build_header_response(), check_write_done(), MHD_request_handle_idle_(), MHD_request_handle_write_(), and try_ready_chunked_body().
size_t MHD_Request::write_buffer_size |
Size of write_buffer (in bytes).
Definition at line 482 of file internal.h.
Referenced by build_header_response(), check_write_done(), and try_ready_chunked_body().