TSG-22258 HTTP/2解析层不在扫描HTTP Method为CONNECT的请求,提供edit_element_tool工具获取HTML/JSON的层级关系
This commit is contained in:
@@ -1658,8 +1658,16 @@ static void fill_req_spec_from_handle(struct tfe_h2_half_private *half_private)
|
||||
}
|
||||
}
|
||||
char *urltmp = ALLOC(char, urllen + 1);
|
||||
if(urltmp){
|
||||
sprintf(urltmp, "%s%s", (char *)req_spec->host, (char *)req_spec->uri);
|
||||
if(urltmp)
|
||||
{
|
||||
if(req_spec->host != NULL && req_spec->uri == NULL)
|
||||
{
|
||||
sprintf(urltmp, "%s", (char *)req_spec->host);
|
||||
}
|
||||
if(req_spec->host != NULL && req_spec->uri != NULL)
|
||||
{
|
||||
sprintf(urltmp, "%s%s", (char *)req_spec->host, (char *)req_spec->uri);
|
||||
}
|
||||
req_spec->url = urltmp;
|
||||
}
|
||||
return;
|
||||
@@ -1784,6 +1792,12 @@ static int http2_client_submit_header(struct tfe_h2_stream *h2_stream_info, int3
|
||||
fill_req_spec_from_handle(h2_session->req);
|
||||
//h2_stream_info->as_client->last_sent_stream_id = MIN(h2_stream_info->as_client->last_sent_stream_id, stream_id) - 1;
|
||||
|
||||
if(req->half_public.req_spec.method == TFE_HTTP_METHOD_CONNECT)
|
||||
{
|
||||
stream_action = ACTION_FORWARD_DATA;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
req->event_cb(req, EV_HTTP_REQ_HDR, NULL, 0, req->event_cb_user);
|
||||
|
||||
// int googletest, h2_stream_info->tf_stream is NULL
|
||||
@@ -2415,7 +2429,9 @@ static int http2_server_on_data_chunk_recv(nghttp2_session *session, uint8_t fla
|
||||
data = input;
|
||||
len = input_len;
|
||||
/*todo post data scan**/
|
||||
if (req->body_state == H2_READ_STATE_BEGIN){
|
||||
|
||||
if (req->body_state == H2_READ_STATE_BEGIN)
|
||||
{
|
||||
if (req->event_cb)
|
||||
{
|
||||
req->event_cb(req, EV_HTTP_REQ_BODY_BEGIN, NULL, len,
|
||||
|
||||
Reference in New Issue
Block a user