...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#define HTTPc_HDR_VAL_LEN_MAX 10 HTTPc_HDR HTTPc_ReqHdr; CPU_CHAR HTTPc_ReqHdrValStr[HTTPc_HDR_VAL_LEN_MAX]; static CPU_BOOLEAN HTTPc_ReqHdrHook (HTTPc_CONN_OBJ *p_conn, HTTPc_REQ_OBJ *p_req, HTTPc_HDR **p_hdr) { HTTPc_HDR *p_hdr_tmp; p_hdr_tmp = &HTTPc_ReqHdr; p_hdr_tmp->ValPtr = &HTTPc_ReqHdrValStr[0]; p_hdr_tmp->HdrField = HTTP_HDR_FIELD_COOKIE; Str_Copy_N(p_hdr_tmp->ValPtr, "ID=234668", HTTPc_HDR_VAL_LEN_MAX); p_hdr_tmp->ValLen = Str_Len_N(p_hdr_tmp->ValPtr, HTTPc_HDR_VAL_LEN_MAX); *p_hdr = p_hdr_tmp; return (DEF_YES); } |
...