支持缓存校验。
This commit is contained in:
@@ -432,7 +432,28 @@ static inline int tfe_http_in_request(enum tfe_http_event events)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
static inline int tfe_http_in_response(enum tfe_http_event events)
|
||||
{
|
||||
return !(tfe_http_in_request(events));
|
||||
}
|
||||
|
||||
static inline struct tfe_http_half* tfe_http_session_request_duplicate(struct tfe_http_session * session)
|
||||
{
|
||||
struct http_field_name in_header_field{};
|
||||
const char * in_header_value = NULL;
|
||||
void * iterator = NULL;
|
||||
|
||||
struct tfe_http_half* dup_req=tfe_http_session_request_create(session, session->req->req_spec.method, session->req->req_spec.uri);
|
||||
while (true)
|
||||
{
|
||||
if ((in_header_value = tfe_http_field_iterate(session->req, &iterator, &in_header_field)) == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
tfe_http_field_write(dup_req, &in_header_field,in_header_value);
|
||||
}
|
||||
return dup_req;
|
||||
}
|
||||
|
||||
//@flag EV_HTTP_RESP_BODY_END, EV_HTTP_RESP_BODY_FULL,
|
||||
//suspend stream on EV_HTTP_REQ_BODY_BEGIN, resume when EV_HTTP_REQ_BODY_END.
|
||||
|
||||
Reference in New Issue
Block a user