The HTTP response parsing context for a response fresh from the server. This context is passed into the http-parser registered callbacks. The registered callbacks are private functions of the form httpParserXXXXCallbacks(). More...
#include <core_http_client_private.h>
Data Fields | |
http_parser | httpParser |
HTTPParsingState_t | state |
HTTPResponse_t * | pResponse |
uint8_t | isHeadResponse |
const char * | pBufferCur |
const char * | pLastHeaderField |
size_t | lastHeaderFieldLen |
const char * | pLastHeaderValue |
size_t | lastHeaderValueLen |
The HTTP response parsing context for a response fresh from the server. This context is passed into the http-parser registered callbacks. The registered callbacks are private functions of the form httpParserXXXXCallbacks().
The transitions of the httpParserXXXXCallback() functions are shown below. The XXXX is replaced by the strings in the state boxes:
+------------------—+ |onMessageBegin | +-----—+---------—+
v +-----—+---------—+ |onStatus | +-----—+---------—+
v +-----—+---------—+ |onHeaderField +<—+ +-----—+---------—+ | | | | |(More headers) | | v | +-----—+---------—+ | |onHeaderValue +-—^ +-----—+---------—+
v +-----—+---------—+ |onHeadersComplete | +------------------—+
v +-----—+---------—+ |onBody +<—+ +-----—+-----—+—+ | | | |(Transfer-encoding chunked body) | | | | +-----—+ | v +-----—+---------—+ |onMessageComplete | +------------------—+
http_parser HTTPParsingContext_t::httpParser |
Third-party http-parser context.
HTTPParsingState_t HTTPParsingContext_t::state |
The current state of the HTTP response parsed.
HTTPResponse_t* HTTPParsingContext_t::pResponse |
HTTP response associated with this parsing context.
uint8_t HTTPParsingContext_t::isHeadResponse |
HTTP response is for a HEAD request.
const char* HTTPParsingContext_t::pBufferCur |
The current location of the parser in the response buffer.
const char* HTTPParsingContext_t::pLastHeaderField |
Holds the last part of the header field parsed.
size_t HTTPParsingContext_t::lastHeaderFieldLen |
The length of the last header field parsed.
const char* HTTPParsingContext_t::pLastHeaderValue |
Holds the last part of the header value parsed.
size_t HTTPParsingContext_t::lastHeaderValueLen |
The length of the last value field parsed.