diff --git a/plugin/protocol/http/src/http_half.cpp b/plugin/protocol/http/src/http_half.cpp index 34f4bda..9ede1b2 100644 --- a/plugin/protocol/http/src/http_half.cpp +++ b/plugin/protocol/http/src/http_half.cpp @@ -422,10 +422,17 @@ static int __parser_callback_on_body(struct http_parser * parser, const char * a length, hf_private->event_cb_user); } - if (ret < 0) + if (unlikely(ret < 0)) { - //TODO: what to do if writter raise an error. - assert(0); + static const char * __str_error_uncompress = "Failed at uncompress HTTP body"; + static const char * __str_error_event = "Failed at calling user's callback for HTTP body"; + + const char * __what = hf_private->cv_uncompress_object != NULL ? __str_error_uncompress : __str_error_event; + const char * __str_stream = hf_private->session->hc_private->stream->str_stream_info; + const char * __str_url = hf_private->session->hs_public.req->req_spec.url; + + TFE_LOG_ERROR(g_http_plugin->access_logger, "%s %s %s, ret = %d. ", __str_stream, __str_url, __what, ret); + hf_private->is_passthrough = true; return -1; } }