From 328291751e5c8125a58b894b83e2a2e46c044e78 Mon Sep 17 00:00:00 2001 From: stefanocasazza Date: Tue, 4 Apr 2017 12:22:59 +0200 Subject: [PATCH] fix --- .../net/server/plugin/usp/businesses.usp.save | 470 ++++++++++++++++++ src/ulib/orm/orm_driver.cpp | 2 +- src/ulib/utility/uhttp.cpp | 13 +- 3 files changed, 479 insertions(+), 6 deletions(-) create mode 100644 src/ulib/net/server/plugin/usp/businesses.usp.save diff --git a/src/ulib/net/server/plugin/usp/businesses.usp.save b/src/ulib/net/server/plugin/usp/businesses.usp.save new file mode 100644 index 00000000..3d4505aa --- /dev/null +++ b/src/ulib/net/server/plugin/usp/businesses.usp.save @@ -0,0 +1,470 @@ + + + + + diff --git a/src/ulib/orm/orm_driver.cpp b/src/ulib/orm/orm_driver.cpp index 27d7ea55..bedd0faa 100644 --- a/src/ulib/orm/orm_driver.cpp +++ b/src/ulib/orm/orm_driver.cpp @@ -196,8 +196,8 @@ bool UOrmDriver::loadDriver(const UString& dir, const UString& driver_list) env_option = (const char*) U_SYSCALL(getenv, "%S", "ORM_OPTION"); if (env_driver) env_driver_len = u__strlen(env_driver, __PRETTY_FUNCTION__); -# endif } +# endif U_RETURN(true); } diff --git a/src/ulib/utility/uhttp.cpp b/src/ulib/utility/uhttp.cpp index 5d247ddf..915a8097 100644 --- a/src/ulib/utility/uhttp.cpp +++ b/src/ulib/utility/uhttp.cpp @@ -6199,9 +6199,11 @@ void UHTTP::setStatusDescription() { U_TRACE_NO_PARAM(0, "UHTTP::setStatusDescription()") - U_INTERNAL_DUMP("old_response_code = %u U_http_info.nResponseCode = %u", old_response_code, U_http_info.nResponseCode) + U_INTERNAL_DUMP("old_response_code = %u U_http_info.nResponseCode = %u UClientImage_Base::iov_vec[0] = %.*S", old_response_code, + U_http_info.nResponseCode, UClientImage_Base::iov_vec[0].iov_len, UClientImage_Base::iov_vec[0].iov_base) - if (old_response_code != U_http_info.nResponseCode) + if (old_response_code != U_http_info.nResponseCode || + UClientImage_Base::iov_vec[0].iov_len == 0) { switch ((old_response_code = U_http_info.nResponseCode)) { @@ -6324,9 +6326,9 @@ void UHTTP::setStatusDescription() } } - U_INTERNAL_ASSERT_MAJOR(UClientImage_Base::iov_vec[0].iov_len, 0) - U_INTERNAL_DUMP("UClientImage_Base::iov_vec[0] = %.*S", UClientImage_Base::iov_vec[0].iov_len, UClientImage_Base::iov_vec[0].iov_base) + + U_INTERNAL_ASSERT_MAJOR(UClientImage_Base::iov_vec[0].iov_len, 0) } void UHTTP::handlerResponse() @@ -6787,7 +6789,6 @@ void UHTTP::setDynamicResponse() U_INTERNAL_DUMP("UClientImage_Base::wbuffer(%u) = %V", UClientImage_Base::wbuffer->size(), UClientImage_Base::wbuffer->rep) - U_INTERNAL_ASSERT(*UClientImage_Base::wbuffer) U_INTERNAL_ASSERT_MAJOR(U_http_info.nResponseCode, 0) int ratio; @@ -6837,6 +6838,8 @@ void UHTTP::setDynamicResponse() { *UClientImage_Base::body = *UClientImage_Base::wbuffer; + if (clength == 0) goto no_response; + goto end; } }