Close #33 增加HTTP Upgrade透明转发的功能
This commit is contained in:
@@ -775,6 +775,11 @@ int hf_private_parse(struct http_half_private * hf_private, const unsigned char
|
||||
__is_paused = true;
|
||||
}
|
||||
|
||||
if (hf_private->parse_object->upgrade)
|
||||
{
|
||||
hf_private->is_upgrade = true;
|
||||
}
|
||||
|
||||
if (sz_parsed == __len_with_offset)
|
||||
{
|
||||
hf_private->parse_cursor += sz_parsed;
|
||||
@@ -1091,10 +1096,12 @@ void __write_access_log(struct http_session_private * hs_private)
|
||||
const char * __str_cont_length = resp_spec ? resp_spec->content_length : "-";
|
||||
/* Content Encoding */
|
||||
const char * __str_cont_encoding = resp_spec ? resp_spec->content_encoding : "-";
|
||||
/* Upgrade Tag */
|
||||
const char * __str_upgrade = response->is_upgrade ? "UPGRADE" : "-";
|
||||
|
||||
char * __access_log;
|
||||
asprintf(&__access_log, "%s %s %s %s %s %s", __str_method,
|
||||
__str_url, __str_resp_code, __str_cont_type, __str_cont_length, __str_cont_encoding);
|
||||
asprintf(&__access_log, "%s %s %s %s %s %s %s", __str_method,
|
||||
__str_url, __str_resp_code, __str_cont_type, __str_cont_length, __str_cont_encoding, __str_upgrade);
|
||||
|
||||
const struct tfe_stream * stream = hs_private->hc_private->stream;
|
||||
tfe_stream_write_access_log(stream, RLOG_LV_INFO, "%s", __access_log);
|
||||
|
||||
Reference in New Issue
Block a user