summaryrefslogtreecommitdiff
path: root/plugin/protocol/http/src/http_entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/protocol/http/src/http_entry.cpp')
-rw-r--r--plugin/protocol/http/src/http_entry.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/plugin/protocol/http/src/http_entry.cpp b/plugin/protocol/http/src/http_entry.cpp
index 0c45447..54804fb 100644
--- a/plugin/protocol/http/src/http_entry.cpp
+++ b/plugin/protocol/http/src/http_entry.cpp
@@ -386,6 +386,7 @@ enum tfe_stream_action http_connection_entry(const struct tfe_stream * stream, e
bool __need_to_close_the_session = false;
int ret = 0;
+ int user_construct_ret = 0;
enum tfe_stream_action __action = ACTION_FORWARD_DATA;
size_t __action_args = 0;
@@ -454,6 +455,16 @@ enum tfe_stream_action http_connection_entry(const struct tfe_stream * stream, e
goto __passthrough;
}
+ user_construct_ret = (dir == CONN_DIR_DOWNSTREAM) ?
+ __on_request_handle_user_req_or_resp(stream, hs_private, hf_private_in, __need_to_close_the_session) :
+ __on_response_handle_user_req_or_resp(stream, hs_private, hf_private_in, __need_to_close_the_session);
+
+ if (user_construct_ret < 0)
+ {
+ assert(0);
+ goto __passthrough;
+ }
+
/* Need more data, no boundary touched */
if (ret == 0)
{
@@ -477,16 +488,6 @@ enum tfe_stream_action http_connection_entry(const struct tfe_stream * stream, e
goto __passthrough;
}
- ret = (dir == CONN_DIR_DOWNSTREAM) ?
- __on_request_handle_user_req_or_resp(stream, hs_private, hf_private_in, __need_to_close_the_session) :
- __on_response_handle_user_req_or_resp(stream, hs_private, hf_private_in, __need_to_close_the_session);
-
- if (ret < 0)
- {
- assert(0);
- goto __passthrough;
- }
-
/* Touch a boundary, such as the end of HTTP headers, bodys, et al. */
__action_args = hf_private_in->parse_cursor;
hf_private_in->parse_cursor = 0;