added a couple of functions for handling trailers
This commit is contained in:
@ -48,7 +48,8 @@ enum qse_htrd_option_t
|
||||
QSE_HTRD_SKIPINITIALLINE = (1 << 1), /**< skip processing an initial line */
|
||||
QSE_HTRD_PEEKONLY = (1 << 2), /**< trigger a peek callback after headers without processing contents */
|
||||
QSE_HTRD_REQUEST = (1 << 3), /**< parse input as a request */
|
||||
QSE_HTRD_RESPONSE = (1 << 4) /**< parse input as a response */
|
||||
QSE_HTRD_RESPONSE = (1 << 4), /**< parse input as a response */
|
||||
QSE_HTRD_TRAILERS = (1 << 5) /**< store trailers in a separate table */
|
||||
};
|
||||
|
||||
typedef enum qse_htrd_option_t qse_htrd_option_t;
|
||||
|
@ -91,6 +91,7 @@ struct qse_htre_t
|
||||
|
||||
/* header table */
|
||||
qse_htb_t hdrtab;
|
||||
qse_htb_t trailers;
|
||||
|
||||
/* content octets */
|
||||
qse_mbs_t content;
|
||||
@ -165,12 +166,23 @@ const qse_mchar_t* qse_htre_getheaderval (
|
||||
const qse_mchar_t* key
|
||||
);
|
||||
|
||||
const qse_mchar_t* qse_htre_gettrailerval (
|
||||
const qse_htre_t* re,
|
||||
const qse_mchar_t* key
|
||||
);
|
||||
|
||||
int qse_htre_walkheaders (
|
||||
qse_htre_t* re,
|
||||
qse_htre_header_walker_t walker,
|
||||
void* ctx
|
||||
);
|
||||
|
||||
int qse_htre_walktrailers (
|
||||
qse_htre_t* re,
|
||||
qse_htre_header_walker_t walker,
|
||||
void* ctx
|
||||
);
|
||||
|
||||
/**
|
||||
* The qse_htre_addcontent() function adds a content semgnet pointed to by
|
||||
* @a ptr of @a len bytes to the content buffer. If @a re is already completed
|
||||
|
Reference in New Issue
Block a user