OSDN Git Service

bug fix. Can not get statistic when option -c only.
[ultramonkey-l7/ultramonkey-l7-v3.git] / l7vsd / module / protocol / protocol_module_sessionless.cpp
index c6a5aae..27ef5dc 100644 (file)
@@ -1747,7 +1747,7 @@ protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_client_recv(
                                 }
                                 //status is SEND_NG
                                 else if (it->status == SEND_NG) {
-                                        if (forwarded_for == FORWARDED_FOR_ON) {
+                                        if (statistic == COLLECT_STATS_ON || forwarded_for == FORWARDED_FOR_ON) {
                                                 //check http method
                                                 check_result = check_http_method(recv_data.receive_buffer + it->send_offset, data_remain_size);
                                                 /*-------- DEBUG LOG --------*/
@@ -1958,7 +1958,7 @@ protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_client_recv(
                                 new_send_it->send_offset = recv_data.receive_buffer_max_size - recv_data.receive_buffer_rest_size
                                                            - request_data_remain_size;
 
-                                if (forwarded_for == FORWARDED_FOR_ON || session_data->sorry_flag == SORRY_FLAG_ON) {
+                                if (statistic == COLLECT_STATS_ON || forwarded_for == FORWARDED_FOR_ON || session_data->sorry_flag == SORRY_FLAG_ON) {
                                         //check http method
                                         check_result = check_http_method(recv_data.receive_buffer + new_send_it->send_offset,
                                                                          request_data_remain_size);