修正suspend/resume语义实现的若干问题,增加自行构建request/response的header标志
This commit is contained in:
@@ -907,6 +907,7 @@ int make_revalidate_request(const struct tfe_stream * stream, const struct tfe_h
|
||||
if(events & EV_HTTP_REQ_END && ctx->cache_revalidate_req)
|
||||
{
|
||||
ctx->cache_revalidate_req=NULL;
|
||||
return RESUMED_CB_NO_MORE_CALLS;
|
||||
}
|
||||
return RESUMED_CB_MORE_CALLS;
|
||||
}
|
||||
@@ -1001,12 +1002,12 @@ static void cache_pending_on_succ(future_result_t * result, void * user)
|
||||
ctx->f_cache_pending=NULL;
|
||||
if(meta==NULL)
|
||||
{
|
||||
ctx->pending_result==PENDING_RESULT_MISS;
|
||||
ctx->pending_result = PENDING_RESULT_MISS;
|
||||
return;
|
||||
}
|
||||
if(!(meta->etag && meta->last_modified))
|
||||
{
|
||||
ctx->pending_result==PENDING_RESULT_FOBIDDEN;
|
||||
ctx->pending_result = PENDING_RESULT_FOBIDDEN;
|
||||
return;
|
||||
}
|
||||
ctx->pending_result=PENDING_RESULT_REVALIDATE;
|
||||
@@ -1058,6 +1059,7 @@ void cache_pending(const struct tfe_http_session * session, unsigned int thread_
|
||||
{
|
||||
case PENDING_RESULT_REVALIDATE:
|
||||
ctx->ref_session=tfe_http_session_allow_write(session);
|
||||
assert(ctx->ref_session != NULL);
|
||||
tfe_http_session_suspend(ctx->ref_session);
|
||||
break;
|
||||
case PENDING_RESULT_ALLOWED:
|
||||
|
||||
Reference in New Issue
Block a user