正确处理etag和last_modified元信息。
This commit is contained in:
@@ -935,8 +935,10 @@ static void cache_query_on_succ(future_result_t * result, void * user)
|
||||
tfe_http_session_resume(ctx->ref_session);
|
||||
|
||||
ctx->cached_response=tfe_http_session_response_create(ctx->ref_session, 200);
|
||||
tfe_http_nonstd_field_write(ctx->cached_response, "X-Cache-Lookup", "Hit From TFE");
|
||||
tfe_http_std_field_write(ctx->cached_response, TFE_HTTP_CONT_TYPE, meta->content_type);
|
||||
tfe_http_std_field_write(ctx->cached_response, TFE_HTTP_LAST_MODIFIED, meta->last_modified);
|
||||
tfe_http_std_field_write(ctx->cached_response, TFE_HTTP_ETAG, meta->etag);
|
||||
tfe_http_nonstd_field_write(ctx->cached_response, "X-Cache-Lookup", "Hit From TFE");
|
||||
snprintf(temp, sizeof(temp), "%lu", meta->content_length);
|
||||
tfe_http_std_field_write(ctx->cached_response, TFE_HTTP_CONT_LENGTH, temp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user