1、修复cache上传时,未判断查询状态的bug。2、upstream ssl无alpn时,downstream ssl 不注册alpn回调。

This commit is contained in:
zhengchao
2018-10-31 12:08:47 +08:00
parent 92698c9810
commit caedf0ee9c
2 changed files with 2 additions and 2 deletions

View File

@@ -1383,7 +1383,7 @@ static SSL * downstream_ssl_create(struct ssl_mgr * mgr, struct keyring * crt, c
SSL_CTX_set_tmp_ecdh(sslctx, ecdh);
EC_KEY_free(ecdh);
}
if(!mgr->no_alpn)
if(!mgr->no_alpn && selected_alpn)
{
SSL_CTX_set_alpn_select_cb(sslctx, alpn_select_proto_cb, (void*)selected_alpn);
}

View File

@@ -1215,7 +1215,7 @@ void pangu_on_http_data(const struct tfe_stream * stream, const struct tfe_http_
}
}
if(tfe_http_in_response(events))
if(tfe_http_in_response(events)&& ctx->pending_result==PENDING_RESULT_MISS)
{
cache_update(session, events, body_frag, frag_size, thread_id, ctx);
}