mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
fix
This commit is contained in:
parent
ab5044b604
commit
215c334a3f
|
@ -362,6 +362,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
18
configure
vendored
18
configure
vendored
|
@ -640,6 +640,7 @@ LTLIBOBJS
|
|||
ULIB_SYSCONFDIR
|
||||
ULIB_MODULEDIR
|
||||
RPM_CONFIGURE
|
||||
STD_GNU11
|
||||
USP_LDFLAGS
|
||||
USP_FLAGS
|
||||
USP_LIBS
|
||||
|
@ -32805,6 +32806,7 @@ if test "x$ac_cv_crc32_intrinsics" = xyes; then
|
|||
|
||||
case `gcc --version | head -n 1` in
|
||||
$to_match) ULIB_LIBS="$ULIB_LIBS -lgcc_s -lgcc" ;; # On Ubuntu 16.04 bug: [#65612](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65612)
|
||||
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
@ -32915,13 +32917,29 @@ ULIB_VERSION="$PACKAGE_VERSION"
|
|||
|
||||
|
||||
|
||||
STD_GNU11=
|
||||
if test "x$ax_cv_cxx_compile_cxx11" = xno -a "x$ax_cv_cxx_compile_cxx11__std_gnupp11" = xyes; then
|
||||
CXXFLAGS="-std=gnu++11 $CXXFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for workaround to enable on Sabayon" >&5
|
||||
$as_echo_n "checking for workaround to enable on Sabayon... " >&6; }
|
||||
to_match='gcc (Gentoo Hardened 4.9.3*'
|
||||
case `gcc --version | head -n 1` in
|
||||
$to_match)
|
||||
STD_GNU11="-std=gnu++11"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
|
||||
$as_echo "enabled" >&6; }
|
||||
;;
|
||||
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; } ;;
|
||||
esac
|
||||
fi
|
||||
if test "x$ax_cv_cxx_compile_cxx14" = xno -a "x$ax_cv_cxx_compile_cxx14__std_gnupp14" = xyes; then
|
||||
CXXFLAGS="-std=gnu++14 $CXXFLAGS"
|
||||
fi
|
||||
|
||||
|
||||
CXX=$CXX_save
|
||||
|
||||
|
||||
|
|
14
configure.ac
14
configure.ac
|
@ -2540,6 +2540,7 @@ if test "x$ac_cv_crc32_intrinsics" = xyes; then
|
|||
|
||||
case `gcc --version | head -n 1` in
|
||||
$to_match) ULIB_LIBS="$ULIB_LIBS -lgcc_s -lgcc" ;; # On Ubuntu 16.04 bug: [#65612](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65612)
|
||||
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
@ -2581,12 +2582,25 @@ AC_SUBST(USP_LIBS)
|
|||
AC_SUBST(USP_FLAGS)
|
||||
AC_SUBST(USP_LDFLAGS)
|
||||
|
||||
STD_GNU11=
|
||||
if test "x$ax_cv_cxx_compile_cxx11" = xno -a "x$ax_cv_cxx_compile_cxx11__std_gnupp11" = xyes; then
|
||||
CXXFLAGS="-std=gnu++11 $CXXFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for workaround to enable on Sabayon)
|
||||
to_match='gcc (Gentoo Hardened 4.9.3*'
|
||||
case `gcc --version | head -n 1` in
|
||||
$to_match)
|
||||
STD_GNU11="-std=gnu++11"
|
||||
|
||||
AC_MSG_RESULT(enabled)
|
||||
;;
|
||||
*) AC_MSG_RESULT(no) ;;
|
||||
esac
|
||||
fi
|
||||
if test "x$ax_cv_cxx_compile_cxx14" = xno -a "x$ax_cv_cxx_compile_cxx14__std_gnupp14" = xyes; then
|
||||
CXXFLAGS="-std=gnu++14 $CXXFLAGS"
|
||||
fi
|
||||
AC_SUBST(STD_GNU11)
|
||||
|
||||
CXX=$CXX_save
|
||||
AC_SUBST(CXX)
|
||||
|
|
|
@ -326,6 +326,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -309,6 +309,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -298,6 +298,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -297,6 +297,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -247,6 +247,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -394,6 +394,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -319,6 +319,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -395,6 +395,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -378,6 +378,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -338,6 +338,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -311,6 +311,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -318,6 +318,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -299,6 +299,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -299,6 +299,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -299,6 +299,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -295,6 +295,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -297,6 +297,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -311,6 +311,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -304,6 +304,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -312,6 +312,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -304,6 +304,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -298,6 +298,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -330,6 +330,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -353,6 +353,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -319,6 +319,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -299,6 +299,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -299,6 +299,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -338,6 +338,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -247,6 +247,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -20,7 +20,35 @@
|
|||
# include <ulib/internal/config.h>
|
||||
# include <ulib/base/replace/replace.h>
|
||||
#else
|
||||
# define restrict __restrict
|
||||
/* Minimal environment configuration */
|
||||
# define HAVE_CXX11 1
|
||||
# define HAVE_CXX14 1
|
||||
# define ENABLE_LFS 1
|
||||
# define HAVE_ARCH64 1
|
||||
# define DISABLE_ZIP 1
|
||||
# define HAVE_DLFCN_H 1
|
||||
# define DISABLE_IPV6 1
|
||||
# define HAVE_DIRENT_H 1
|
||||
# define U_LOG_DISABLE 1
|
||||
# define RETSIGTYPE void
|
||||
# define ENABLE_MEMPOOL 1
|
||||
# define HAVE_SIGINFO_T 1
|
||||
# define U_STDCPP_ENABLE 1
|
||||
# define U_HTTP2_DISABLE 1
|
||||
# define HAVE_SYS_IOCTL_H 1
|
||||
# define PACKAGE_NAME "ULib"
|
||||
# define HAVE_NETINET_IN_H 1
|
||||
# define ULIB_VERSION "1.4.2"
|
||||
# define USE_HARDWARE_CRC32 1
|
||||
# define HAVE_SYS_SENDFILE_H 1
|
||||
# define PACKAGE_VERSION "1.4.2"
|
||||
# define HAVE_NETPACKET_PACKET_H 1
|
||||
# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match '/' */
|
||||
# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars */
|
||||
# define FNM_PERIOD (1 << 2) /* Leading '.' is matched only explicitly */
|
||||
# define U_CACHE_REQUEST_DISABLE 1
|
||||
# define U_PIPELINE_HOMOGENEOUS_DISABLE 1
|
||||
# define restrict
|
||||
# include <ulib/internal/platform.h>
|
||||
# ifndef U_LIBEXECDIR
|
||||
# define U_LIBEXECDIR "/usr/libexec/ulib"
|
||||
|
|
|
@ -156,8 +156,41 @@ public:
|
|||
|
||||
// LOG
|
||||
|
||||
static void closeLog();
|
||||
static void setLogShared();
|
||||
static void closeLog()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::closeLog()")
|
||||
|
||||
# ifndef U_LOG_DISABLE
|
||||
if (log &&
|
||||
log_shared_with_server == false)
|
||||
{
|
||||
u_unatexit(&ULog::close); // unregister function of close at exit()...
|
||||
ULog::close();
|
||||
|
||||
log = 0;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
void clearData()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::clearData()")
|
||||
|
||||
buffer.setEmpty();
|
||||
response.setEmpty();
|
||||
}
|
||||
|
||||
static void setLogShared()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::setLogShared()")
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(UServer_Base::log)
|
||||
|
||||
# ifndef U_LOG_DISABLE
|
||||
log = UServer_Base::log;
|
||||
log_shared_with_server = true;
|
||||
# endif
|
||||
}
|
||||
|
||||
static bool isLogSharedWithServer()
|
||||
{
|
||||
|
@ -176,7 +209,6 @@ public:
|
|||
unsigned int getPort() const { return port; }
|
||||
|
||||
bool connect();
|
||||
void clearData();
|
||||
bool remoteIPAddress(UIPAddress& addr);
|
||||
bool readResponse(uint32_t count = U_SINGLE_READ);
|
||||
bool setHostPort(const UString& host, unsigned int port);
|
||||
|
|
|
@ -185,7 +185,7 @@ public:
|
|||
static char response_buffer[64];
|
||||
static int mime_index, cgi_timeout; // the time-out value in seconds for output cgi process
|
||||
static bool enable_caching_by_proxy_servers, skip_check_cookie_ip_address;
|
||||
static uint32_t limit_request_body, request_read_timeout, range_start, range_size, response_code;
|
||||
static uint32_t limit_request_body, request_read_timeout, range_start, range_size;
|
||||
|
||||
static int handlerREAD();
|
||||
static bool readRequest();
|
||||
|
@ -327,9 +327,7 @@ public:
|
|||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::startRequest()")
|
||||
|
||||
# if defined(U_SERVER_CHECK_TIME_BETWEEN_REQUEST) || (defined(DEBUG) && !defined(U_LOG_DISABLE))
|
||||
UClientImage_Base::startRequest();
|
||||
# endif
|
||||
|
||||
// ------------------------------
|
||||
// U_http_info.uri
|
||||
|
@ -1127,6 +1125,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
static uint32_t old_response_code;
|
||||
|
||||
static void setMimeIndex()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::setMimeIndex()")
|
||||
|
|
|
@ -264,6 +264,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
// NB: to use with ULib compiled in this way: ./configure --disable-shared && make
|
||||
|
||||
#include "../test.h"
|
||||
|
||||
#define HAVE_CONFIG_H
|
||||
#include <ulib/json/value.h>
|
||||
#undef HAVE_CONFIG_H
|
||||
/**
|
||||
* NB: if ULib is configured and compiled (./configure --disable-shared && make) use this way:
|
||||
*
|
||||
* #define HAVE_CONFIG_H
|
||||
* #include <ulib/json/value.h>
|
||||
* #undef HAVE_CONFIG_H
|
||||
*
|
||||
* otherwise:
|
||||
*
|
||||
* #include <ULib/src/ulib/all_cpp.cpp>
|
||||
*/
|
||||
|
||||
#include <ULib/src/ulib/all_cpp.cpp>
|
||||
|
||||
static ULib ulib("167193,0,0,0,-30,-31,-30,-31,0");
|
||||
|
||||
|
|
|
@ -620,6 +620,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
172
src/ulib/all_c.c
172
src/ulib/all_c.c
|
@ -18,100 +18,80 @@
|
|||
# include "base/base_trace.c"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBZ
|
||||
# include "base/coder/cgzio.c"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ZIP
|
||||
# include "base/zip/dostime.c"
|
||||
# include "base/zip/inflate.c"
|
||||
# include "base/zip/pushback.c"
|
||||
# include "base/zip/ziptool.c"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBSSL
|
||||
# include "base/ssl/dgst.c"
|
||||
# include "base/ssl/cdes3.c"
|
||||
#endif
|
||||
|
||||
#ifdef _MSWINDOWS_
|
||||
# include "base/win32/mingw32.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ASSERT_H
|
||||
# include "replace/assert.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SEM_INIT
|
||||
# include "replace/sem.c"
|
||||
#elif !defined(HAVE_SEM_TIMEDWAIT)
|
||||
# include "replace/sem_timedwait.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DAEMON
|
||||
# include "replace/daemon.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
# include "replace/getopt_long.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
# include "replace/strndup.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRPTIME
|
||||
# include "replace/strptime.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_NANOSLEEP
|
||||
# include "replace/nanosleep.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MREMAP
|
||||
# include "replace/mremap.c"
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SENDFILE) && !defined(HAVE_MACOSX_SENDFILE)
|
||||
# include "replace/sendfile.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MKDTEMP
|
||||
# include "replace/mkdtemp.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMEM
|
||||
# include "replace/memmem.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMRCHR
|
||||
# include "replace/memrchr.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GMTIME_R
|
||||
# include "replace/gmtime.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIMEGM
|
||||
# include "replace/timegm.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FALLOCATE
|
||||
# include "replace/fallocate.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FALLOCATE64
|
||||
# include "replace/fallocate64.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_PREAD
|
||||
# include "replace/pread.c"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SCHED_GETCPU
|
||||
# include "replace/sched_getcpu.c"
|
||||
#endif
|
||||
|
||||
#ifdef U_APEX_ENABLE
|
||||
# include "base/apex/apex_memmove.c"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# ifdef USE_LIBZ
|
||||
# include "base/coder/cgzio.c"
|
||||
# endif
|
||||
# ifdef ENABLE_ZIP
|
||||
# include "base/zip/dostime.c"
|
||||
# include "base/zip/inflate.c"
|
||||
# include "base/zip/pushback.c"
|
||||
# include "base/zip/ziptool.c"
|
||||
# endif
|
||||
# ifdef USE_LIBSSL
|
||||
# include "base/ssl/dgst.c"
|
||||
# include "base/ssl/cdes3.c"
|
||||
# endif
|
||||
# ifdef _MSWINDOWS_
|
||||
# include "base/win32/mingw32.c"
|
||||
# endif
|
||||
# ifndef HAVE_ASSERT_H
|
||||
# include "replace/assert.c"
|
||||
# endif
|
||||
# ifndef HAVE_SEM_INIT
|
||||
# include "replace/sem.c"
|
||||
# elif !defined(HAVE_SEM_TIMEDWAIT)
|
||||
# include "replace/sem_timedwait.c"
|
||||
# endif
|
||||
# ifndef HAVE_DAEMON
|
||||
# include "replace/daemon.c"
|
||||
# endif
|
||||
# ifndef HAVE_GETOPT_LONG
|
||||
# include "replace/getopt_long.c"
|
||||
# endif
|
||||
# ifndef HAVE_STRNDUP
|
||||
# include "replace/strndup.c"
|
||||
# endif
|
||||
# ifndef HAVE_STRPTIME
|
||||
# include "replace/strptime.c"
|
||||
# endif
|
||||
# ifndef HAVE_NANOSLEEP
|
||||
# include "replace/nanosleep.c"
|
||||
# endif
|
||||
# ifndef HAVE_MREMAP
|
||||
# include "replace/mremap.c"
|
||||
# endif
|
||||
# if !defined(HAVE_SENDFILE) && !defined(HAVE_MACOSX_SENDFILE)
|
||||
# include "replace/sendfile.c"
|
||||
# endif
|
||||
# ifndef HAVE_MKDTEMP
|
||||
# include "replace/mkdtemp.c"
|
||||
# endif
|
||||
# ifndef HAVE_MEMMEM
|
||||
# include "replace/memmem.c"
|
||||
# endif
|
||||
# ifndef HAVE_MEMRCHR
|
||||
# include "replace/memrchr.c"
|
||||
# endif
|
||||
# ifndef HAVE_GMTIME_R
|
||||
# include "replace/gmtime.c"
|
||||
# endif
|
||||
# ifndef HAVE_TIMEGM
|
||||
# include "replace/timegm.c"
|
||||
# endif
|
||||
# ifndef HAVE_FALLOCATE
|
||||
# include "replace/fallocate.c"
|
||||
# endif
|
||||
# ifndef HAVE_FALLOCATE64
|
||||
# include "replace/fallocate64.c"
|
||||
# endif
|
||||
# ifndef HAVE_PREAD
|
||||
# include "replace/pread.c"
|
||||
# endif
|
||||
# ifndef HAVE_SCHED_GETCPU
|
||||
# include "replace/sched_getcpu.c"
|
||||
# endif
|
||||
# ifdef U_APEX_ENABLE
|
||||
# include "base/apex/apex_memmove.c"
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -1,46 +1,29 @@
|
|||
// all.cpp
|
||||
|
||||
#define U_ALL_CPP
|
||||
|
||||
#include <ulib/all.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
# include "debug/trace.cpp"
|
||||
# include "debug/debug_common.cpp"
|
||||
# include "debug/error_memory.cpp"
|
||||
# include "debug/error_simulation.cpp"
|
||||
#ifndef HAVE_CONFIG_H
|
||||
# include "all_c.c"
|
||||
#endif
|
||||
|
||||
#ifdef U_STDCPP_ENABLE
|
||||
# include "internal/objectIO.cpp"
|
||||
# ifdef DEBUG
|
||||
# include "debug/objectDB.cpp"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "internal/error.cpp"
|
||||
#include "internal/memory_pool.cpp"
|
||||
|
||||
#include "command.cpp"
|
||||
#include "options.cpp"
|
||||
#include "timeval.cpp"
|
||||
#include "tokenizer.cpp"
|
||||
#include "timer.cpp"
|
||||
#include "notifier.cpp"
|
||||
#include "string.cpp"
|
||||
#include "file.cpp"
|
||||
#include "process.cpp"
|
||||
#include "notifier.cpp"
|
||||
#include "file_config.cpp"
|
||||
#include "log.cpp"
|
||||
#include "application.cpp"
|
||||
#include "cache.cpp"
|
||||
#include "date.cpp"
|
||||
#include "url.cpp"
|
||||
#include "internal/common.cpp"
|
||||
#include "ui/dialog.cpp"
|
||||
#include "internal/error.cpp"
|
||||
#include "internal/memory_pool.cpp"
|
||||
#include "db/cdb.cpp"
|
||||
#include "db/rdb.cpp"
|
||||
#include "query/query_parser.cpp"
|
||||
#include "mime/header.cpp"
|
||||
#include "mime/entity.cpp"
|
||||
#include "mime/multipart.cpp"
|
||||
|
@ -48,223 +31,202 @@
|
|||
#include "container/hash_map.cpp"
|
||||
#include "container/tree.cpp"
|
||||
#include "event/event_time.cpp"
|
||||
#include "net/ping.cpp"
|
||||
#include "net/socket.cpp"
|
||||
#include "net/ipaddress.cpp"
|
||||
#include "net/ipt_ACCOUNT.cpp"
|
||||
#include "net/client/client.cpp"
|
||||
#include "net/client/pop3.cpp"
|
||||
#include "net/client/imap.cpp"
|
||||
#include "net/client/smtp.cpp"
|
||||
#include "net/client/ftp.cpp"
|
||||
#include "net/client/http.cpp"
|
||||
#include "net/client/redis.cpp"
|
||||
#include "net/client/elasticsearch.cpp"
|
||||
#include "net/rpc/rpc.cpp"
|
||||
#include "net/rpc/rpc_client.cpp"
|
||||
#include "net/rpc/rpc_encoder.cpp"
|
||||
#include "net/rpc/rpc_envelope.cpp"
|
||||
#include "net/rpc/rpc_fault.cpp"
|
||||
#include "net/rpc/rpc_gen_method.cpp"
|
||||
#include "net/rpc/rpc_method.cpp"
|
||||
#include "net/rpc/rpc_object.cpp"
|
||||
#include "net/rpc/rpc_parser.cpp"
|
||||
#include "net/server/server.cpp"
|
||||
#include "net/server/server_rdb.cpp"
|
||||
#include "net/client/client_rdb.cpp"
|
||||
#include "net/server/client_image.cpp"
|
||||
#include "net/server/client_image_rdb.cpp"
|
||||
#include "net/server/plugin/mod_proxy_service.cpp"
|
||||
#include "orm/orm.cpp"
|
||||
#include "orm/orm_driver.cpp"
|
||||
#include "json/value.cpp"
|
||||
#include "utility/lock.cpp"
|
||||
#include "utility/uhttp.cpp"
|
||||
#include "utility/base64.cpp"
|
||||
#include "utility/dir_walk.cpp"
|
||||
#include "utility/bit_array.cpp"
|
||||
#include "utility/interrupt.cpp"
|
||||
#include "utility/services.cpp"
|
||||
#include "utility/semaphore.cpp"
|
||||
#include "utility/websocket.cpp"
|
||||
#include "utility/string_ext.cpp"
|
||||
#include "utility/socket_ext.cpp"
|
||||
#include "utility/ring_buffer.cpp"
|
||||
#include "utility/data_session.cpp"
|
||||
#include "lemon/expression.cpp"
|
||||
|
||||
#ifdef USE_LIBTDB
|
||||
# include "db/tdb.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_MONGODB
|
||||
# include "net/client/mongodb.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef U_HTTP2_DISABLE
|
||||
# include "utility/http2.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef _MSWINDOWS_
|
||||
# include "net/unixsocket.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ZIP
|
||||
# include "zip/zip.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBSSL
|
||||
# include "ssl/certificate.cpp"
|
||||
# include "ssl/pkcs7.cpp"
|
||||
# include "ssl/crl.cpp"
|
||||
# include "ssl/pkcs10.cpp"
|
||||
# include "net/client/twilio.cpp"
|
||||
# include "ssl/mime/mime_pkcs7.cpp"
|
||||
# include "ssl/net/sslsocket.cpp"
|
||||
# include "ssl/net/ssl_session.cpp"
|
||||
# include "utility/des3.cpp"
|
||||
# ifdef HAVE_SSL_TS
|
||||
# include "ssl/timestamp.cpp"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBSSH
|
||||
# include "ssh/net/sshsocket.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBPCRE
|
||||
# include "pcre/pcre.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBEXPAT
|
||||
# include "xml/expat/attribute.cpp"
|
||||
# include "xml/expat/element.cpp"
|
||||
# include "xml/expat/xml_parser.cpp"
|
||||
# include "xml/expat/xml2txt.cpp"
|
||||
# include "xml/soap/soap_encoder.cpp"
|
||||
# include "xml/soap/soap_fault.cpp"
|
||||
# include "xml/soap/soap_gen_method.cpp"
|
||||
# include "xml/soap/soap_parser.cpp"
|
||||
# include "xml/soap/soap_client.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBXML2
|
||||
# include "xml/libxml2/node.cpp"
|
||||
# include "xml/libxml2/schema.cpp"
|
||||
# include "xml/libxml2/document.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBCURL
|
||||
# include "curl/curl.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_PARSER
|
||||
# include "flex/flexer.cpp"
|
||||
# include "flex/bison.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBMAGIC
|
||||
# include "magic/magic.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBLDAP
|
||||
# include "ldap/ldap.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBDBI
|
||||
# include "dbi/dbi.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBEVENT
|
||||
# include "libevent/event.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_THREAD
|
||||
# include "thread.cpp"
|
||||
#endif
|
||||
|
||||
// Handler static/dynamic plugin
|
||||
|
||||
#include "dynamic/dynamic.cpp"
|
||||
#include "dynamic/plugin.cpp"
|
||||
|
||||
#ifdef U_STATIC_HANDLER_ECHO
|
||||
# include "net/server/plugin/mod_echo.cpp"
|
||||
#ifdef U_STDCPP_ENABLE
|
||||
# include "internal/objectIO.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_STREAM
|
||||
# include "net/server/plugin/mod_stream.cpp"
|
||||
#ifndef _MSWINDOWS_
|
||||
# include "net/unixsocket.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_NOCAT
|
||||
# include "net/server/plugin/mod_nocat.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_SOCKET
|
||||
# include "net/server/plugin/mod_socket.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_SCGI
|
||||
# include "net/server/plugin/mod_scgi.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_FCGI
|
||||
# include "net/server/plugin/mod_fcgi.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_SHIB
|
||||
# include "net/server/plugin/mod_shib/mod_shib.cpp"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBGEOIP) && defined(U_STATIC_HANDLER_GEOIP)
|
||||
# include "net/server/plugin/mod_geoip/mod_geoip.cpp"
|
||||
#endif
|
||||
|
||||
#if defined(USE_LIBPCRE) && defined(U_STATIC_HANDLER_PROXY)
|
||||
# include "net/server/plugin/mod_proxy.cpp"
|
||||
#endif
|
||||
|
||||
#if defined(USE_LIBEXPAT) && defined(U_STATIC_HANDLER_SOAP)
|
||||
# include "net/server/plugin/mod_soap.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_SSI
|
||||
# include "net/server/plugin/mod_ssi.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_TSA
|
||||
# include "net/server/plugin/mod_tsa.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_HTTP
|
||||
# include "net/server/plugin/mod_http.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_HANDLER_RPC
|
||||
# include "net/server/plugin/mod_rpc.cpp"
|
||||
#endif
|
||||
|
||||
// Handler static orm driver
|
||||
|
||||
#ifdef U_STATIC_ORM_DRIVER_SQLITE
|
||||
# include "orm/driver/orm_driver_sqlite.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_ORM_DRIVER_MYSQL
|
||||
# include "orm/driver/orm_driver_mysql.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_ORM_DRIVER_PGSQL
|
||||
# include "orm/driver/orm_driver_pgsql.cpp"
|
||||
#endif
|
||||
|
||||
// Handler static http servlet
|
||||
|
||||
#ifdef U_STATIC_ONLY
|
||||
# ifdef U_STATIC_SERVLET
|
||||
# include "net/server/plugin/usp/loader.autoconf.inc"
|
||||
# endif
|
||||
# ifdef U_STATIC_SERVLET_WI_AUTH
|
||||
# include "../../examples/WiAuth/wi_auth.cpp"
|
||||
#ifdef DEBUG
|
||||
# include "debug/trace.cpp"
|
||||
# include "debug/debug_common.cpp"
|
||||
# include "debug/error_memory.cpp"
|
||||
# include "debug/error_simulation.cpp"
|
||||
# ifdef U_STDCPP_ENABLE
|
||||
# include "debug/objectDB.cpp"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "cache.cpp"
|
||||
# include "options.cpp"
|
||||
# include "application.cpp"
|
||||
# include "ui/dialog.cpp"
|
||||
# include "net/ping.cpp"
|
||||
# include "net/ipt_ACCOUNT.cpp"
|
||||
# include "net/client/pop3.cpp"
|
||||
# include "net/client/imap.cpp"
|
||||
# include "net/client/smtp.cpp"
|
||||
# include "net/client/ftp.cpp"
|
||||
# include "net/client/redis.cpp"
|
||||
# include "net/client/elasticsearch.cpp"
|
||||
# include "net/rpc/rpc.cpp"
|
||||
# include "net/rpc/rpc_client.cpp"
|
||||
# include "net/rpc/rpc_encoder.cpp"
|
||||
# include "net/rpc/rpc_envelope.cpp"
|
||||
# include "net/rpc/rpc_fault.cpp"
|
||||
# include "net/rpc/rpc_gen_method.cpp"
|
||||
# include "net/rpc/rpc_method.cpp"
|
||||
# include "net/rpc/rpc_object.cpp"
|
||||
# include "net/rpc/rpc_parser.cpp"
|
||||
# include "net/server/server_rdb.cpp"
|
||||
# include "net/client/client_rdb.cpp"
|
||||
# include "net/server/client_image_rdb.cpp"
|
||||
# include "orm/orm.cpp"
|
||||
# include "utility/bit_array.cpp"
|
||||
# include "utility/ring_buffer.cpp"
|
||||
# include "query/query_parser.cpp"
|
||||
# ifdef USE_LIBTDB
|
||||
# include "db/tdb.cpp"
|
||||
# endif
|
||||
# ifdef USE_MONGODB
|
||||
# include "net/client/mongodb.cpp"
|
||||
# endif
|
||||
# ifndef U_HTTP2_DISABLE
|
||||
# include "utility/http2.cpp"
|
||||
# endif
|
||||
# ifdef ENABLE_ZIP
|
||||
# include "zip/zip.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBSSL
|
||||
# include "ssl/certificate.cpp"
|
||||
# include "ssl/pkcs7.cpp"
|
||||
# include "ssl/crl.cpp"
|
||||
# include "ssl/pkcs10.cpp"
|
||||
# include "net/client/twilio.cpp"
|
||||
# include "ssl/mime/mime_pkcs7.cpp"
|
||||
# include "ssl/net/sslsocket.cpp"
|
||||
# include "ssl/net/ssl_session.cpp"
|
||||
# include "utility/des3.cpp"
|
||||
# ifdef HAVE_SSL_TS
|
||||
# include "ssl/timestamp.cpp"
|
||||
# endif
|
||||
# endif
|
||||
# ifdef USE_LIBSSH
|
||||
# include "ssh/net/sshsocket.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBPCRE
|
||||
# include "pcre/pcre.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBEXPAT
|
||||
# include "xml/expat/attribute.cpp"
|
||||
# include "xml/expat/element.cpp"
|
||||
# include "xml/expat/xml_parser.cpp"
|
||||
# include "xml/expat/xml2txt.cpp"
|
||||
# include "xml/soap/soap_encoder.cpp"
|
||||
# include "xml/soap/soap_fault.cpp"
|
||||
# include "xml/soap/soap_gen_method.cpp"
|
||||
# include "xml/soap/soap_parser.cpp"
|
||||
# include "xml/soap/soap_client.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBXML2
|
||||
# include "xml/libxml2/node.cpp"
|
||||
# include "xml/libxml2/schema.cpp"
|
||||
# include "xml/libxml2/document.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBCURL
|
||||
# include "curl/curl.cpp"
|
||||
# endif
|
||||
# ifdef USE_PARSER
|
||||
# include "flex/flexer.cpp"
|
||||
# include "flex/bison.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBMAGIC
|
||||
# include "magic/magic.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBLDAP
|
||||
# include "ldap/ldap.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBDBI
|
||||
# include "dbi/dbi.cpp"
|
||||
# endif
|
||||
# ifdef USE_LIBEVENT
|
||||
# include "libevent/event.cpp"
|
||||
# endif
|
||||
# ifdef ENABLE_THREAD
|
||||
# include "thread.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_ECHO
|
||||
# include "net/server/plugin/mod_echo.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_STREAM
|
||||
# include "net/server/plugin/mod_stream.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_NOCAT
|
||||
# include "net/server/plugin/mod_nocat.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_SOCKET
|
||||
# include "net/server/plugin/mod_socket.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_SCGI
|
||||
# include "net/server/plugin/mod_scgi.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_FCGI
|
||||
# include "net/server/plugin/mod_fcgi.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_SHIB
|
||||
# include "net/server/plugin/mod_shib/mod_shib.cpp"
|
||||
# endif
|
||||
# if defined(HAVE_LIBGEOIP) && defined(U_STATIC_HANDLER_GEOIP)
|
||||
# include "net/server/plugin/mod_geoip/mod_geoip.cpp"
|
||||
# endif
|
||||
# if defined(USE_LIBPCRE) && defined(U_STATIC_HANDLER_PROXY)
|
||||
# include "net/server/plugin/mod_proxy.cpp"
|
||||
# endif
|
||||
# if defined(USE_LIBEXPAT) && defined(U_STATIC_HANDLER_SOAP)
|
||||
# include "net/server/plugin/mod_soap.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_SSI
|
||||
# include "net/server/plugin/mod_ssi.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_TSA
|
||||
# include "net/server/plugin/mod_tsa.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_HTTP
|
||||
# include "net/server/plugin/mod_http.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_HANDLER_RPC
|
||||
# include "net/server/plugin/mod_rpc.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_ORM_DRIVER_SQLITE
|
||||
# include "orm/driver/orm_driver_sqlite.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_ORM_DRIVER_MYSQL
|
||||
# include "orm/driver/orm_driver_mysql.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_ORM_DRIVER_PGSQL
|
||||
# include "orm/driver/orm_driver_pgsql.cpp"
|
||||
# endif
|
||||
# ifdef U_STATIC_ONLY
|
||||
# ifdef U_STATIC_SERVLET
|
||||
# include "net/server/plugin/usp/loader.autoconf.inc"
|
||||
# endif
|
||||
# ifdef U_STATIC_SERVLET_WI_AUTH
|
||||
# include "../../examples/WiAuth/wi_auth.cpp"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
// Stefano Casazza
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
/*
|
||||
* _oo0oo_
|
||||
* o8888888o
|
||||
|
|
|
@ -51,22 +51,6 @@ UClient_Base::UClient_Base(UFileConfig* pcfg) : response(U_CAPACITY), buffer(U_C
|
|||
}
|
||||
}
|
||||
|
||||
void UClient_Base::closeLog()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::closeLog()")
|
||||
|
||||
#ifndef U_LOG_DISABLE
|
||||
if (log &&
|
||||
log_shared_with_server == false)
|
||||
{
|
||||
u_unatexit(&ULog::close); // unregister function of close at exit()...
|
||||
ULog::close();
|
||||
|
||||
log = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
UClient_Base::~UClient_Base()
|
||||
{
|
||||
U_TRACE_UNREGISTER_OBJECT(0, UClient_Base)
|
||||
|
@ -123,14 +107,6 @@ void UClient_Base::setSSLContext()
|
|||
}
|
||||
#endif
|
||||
|
||||
void UClient_Base::clearData()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::clearData()")
|
||||
|
||||
buffer.setEmpty();
|
||||
response.setEmpty();
|
||||
}
|
||||
|
||||
bool UClient_Base::setHostPort(const UString& host, unsigned int _port)
|
||||
{
|
||||
U_TRACE(0, "UClient_Base::setHostPort(%V,%u)", host.rep, _port)
|
||||
|
@ -183,18 +159,6 @@ bool UClient_Base::setHostPort(const UString& host, unsigned int _port)
|
|||
U_RETURN(false);
|
||||
}
|
||||
|
||||
void UClient_Base::setLogShared()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::setLogShared()")
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(UServer_Base::log)
|
||||
|
||||
#ifndef U_LOG_DISABLE
|
||||
log = UServer_Base::log;
|
||||
log_shared_with_server = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void UClient_Base::loadConfigParam()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClient_Base::loadConfigParam()")
|
||||
|
|
|
@ -838,7 +838,6 @@ bool UHttpClient_Base::sendRequestEngine()
|
|||
{
|
||||
U_TRACE_NO_PARAM(0, "UHttpClient_Base::sendRequestEngine()")
|
||||
|
||||
U_INTERNAL_ASSERT_DIFFERS(U_http_version, '2')
|
||||
U_INTERNAL_ASSERT_RANGE(1,UClient_Base::iovcnt,6)
|
||||
|
||||
UString headers;
|
||||
|
|
|
@ -611,15 +611,19 @@ const char* UClientImage_Base::getRequestUri(uint32_t& sz)
|
|||
}
|
||||
|
||||
#ifdef U_CACHE_REQUEST_DISABLE
|
||||
# define U_IOV_TO_SAVE sizeof(struct iovec)
|
||||
# define U_IOV_TO_SAVE sizeof(struct iovec)
|
||||
# define U_IOV_TO_SAVE_CNT 1
|
||||
#else
|
||||
# define U_IOV_TO_SAVE (sizeof(struct iovec) * 4)
|
||||
# define U_IOV_TO_SAVE (sizeof(struct iovec) * 4)
|
||||
# define U_IOV_TO_SAVE_CNT 4
|
||||
#endif
|
||||
|
||||
void UClientImage_Base::startRequest()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UClientImage_Base::startRequest()")
|
||||
|
||||
iov_sav[0].iov_len = 0;
|
||||
|
||||
#ifdef U_SERVER_CHECK_TIME_BETWEEN_REQUEST
|
||||
long time_elapsed = chronometer->restart();
|
||||
|
||||
|
@ -703,7 +707,12 @@ void UClientImage_Base::endRequest()
|
|||
if (U_http_info.uri_len)
|
||||
# endif
|
||||
{
|
||||
U_MEMCPY(iov_vec, iov_sav, U_IOV_TO_SAVE);
|
||||
if (iov_sav[0].iov_len)
|
||||
{
|
||||
U_DUMP_IOVEC(iov_sav,U_IOV_TO_SAVE_CNT)
|
||||
|
||||
U_MEMCPY(iov_vec, iov_sav, U_IOV_TO_SAVE);
|
||||
}
|
||||
|
||||
# if defined(DEBUG) && !defined(U_LOG_DISABLE)
|
||||
if (UServer_Base::isLog())
|
||||
|
@ -977,9 +986,7 @@ bool UClientImage_Base::genericRead()
|
|||
|
||||
U_INTERNAL_ASSERT_EQUALS(socket->iSockDesc, UEventFd::fd)
|
||||
|
||||
#if defined(U_SERVER_CHECK_TIME_BETWEEN_REQUEST) || (defined(DEBUG) && !defined(U_LOG_DISABLE))
|
||||
startRequest();
|
||||
#endif
|
||||
|
||||
rstart = 0;
|
||||
|
||||
|
@ -1392,6 +1399,7 @@ write:
|
|||
// NB: we are managing a sendfile() request...
|
||||
|
||||
U_INTERNAL_ASSERT_EQUALS(nrequest, 0)
|
||||
U_INTERNAL_ASSERT_DIFFERS(U_http_version, '2')
|
||||
U_INTERNAL_ASSERT_EQUALS(UEventFd::op_mask, EPOLLIN | EPOLLRDHUP | EPOLLET)
|
||||
|
||||
if (writeResponse() == false ||
|
||||
|
@ -1409,9 +1417,7 @@ write:
|
|||
if (U_ClientImage_pipeline)
|
||||
{
|
||||
endRequest();
|
||||
# if defined(U_SERVER_CHECK_TIME_BETWEEN_REQUEST) || (defined(DEBUG) && !defined(U_LOG_DISABLE))
|
||||
startRequest();
|
||||
# endif
|
||||
|
||||
goto pipeline;
|
||||
}
|
||||
|
@ -1510,6 +1516,8 @@ bool UClientImage_Base::writeResponse()
|
|||
|
||||
U_MEMCPY(iov_sav, iov_vec, U_IOV_TO_SAVE);
|
||||
|
||||
U_INTERNAL_ASSERT_MAJOR(iov_sav[0].iov_len, 0)
|
||||
|
||||
# if defined(U_LINUX) && defined(ENABLE_THREAD) && defined(U_LOG_DISABLE) && !defined(USE_LIBZ)
|
||||
U_INTERNAL_ASSERT_POINTER(u_pthread_time)
|
||||
U_INTERNAL_ASSERT_EQUALS(iov_vec[1].iov_base, ULog::ptr_shared_date->date3)
|
||||
|
@ -1695,9 +1703,7 @@ void UClientImage_Base::close()
|
|||
|
||||
setRequestProcessed();
|
||||
|
||||
U_ClientImage_close = true;
|
||||
|
||||
if (U_ClientImage_pipeline) resetPipeline();
|
||||
resetPipelineAndSetCloseConnection();
|
||||
}
|
||||
|
||||
void UClientImage_Base::abortive_close()
|
||||
|
|
|
@ -547,6 +547,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -325,6 +325,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -325,6 +325,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -326,6 +326,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -325,6 +325,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -326,6 +326,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -325,6 +325,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -301,6 +301,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -325,6 +325,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -954,7 +954,7 @@ void UNotifier::modify(UEventFd* item)
|
|||
|
||||
void UNotifier::handlerDelete(int fd, int mask)
|
||||
{
|
||||
U_TRACE(0, "UNotifier::handlerDelete(%d,%d)", fd, mask)
|
||||
U_TRACE(0, "UNotifier::handlerDelete(%d,%B)", fd, mask)
|
||||
|
||||
U_INTERNAL_ASSERT_MAJOR(fd, 0)
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@ MAINTAINERCLEANFILES = Makefile.in
|
|||
|
||||
DEFAULT_INCLUDES = -I. -I$(top_srcdir)/include
|
||||
|
||||
## workaround for gcc version 4.9.3 (Gentoo Hardened 4.9.3 p1.1, pie-0.6.2)
|
||||
DEFS = @STD_GNU11@ @DEFS@
|
||||
|
||||
ulib_la = $(top_builddir)/src/ulib/lib@ULIB@.la
|
||||
|
||||
moduledir = @ULIB_MODULEDIR@
|
||||
|
|
|
@ -270,7 +270,7 @@ CXXCPP = @CXXCPP@
|
|||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEFS = @STD_GNU11@ @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
|
@ -360,6 +360,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -3159,11 +3159,11 @@ void UHTTP2::handlerDelete(UClientImage_Base* pclient, bool& bsocket_open)
|
|||
if (bsocket_open &&
|
||||
pclient->socket->isTimeout())
|
||||
{
|
||||
bsocket_open = false;
|
||||
|
||||
nerror = NO_ERROR;
|
||||
|
||||
sendGoAway(pclient->socket);
|
||||
|
||||
bsocket_open = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3729,7 +3729,14 @@ void UHTTP2::sendGoAway(USocket* psocket)
|
|||
|
||||
pConnection->state = CONN_STATE_IS_CLOSING;
|
||||
|
||||
if (USocketExt::write(psocket, buffer, sizeof(buffer), 0) == sizeof(buffer)) UClientImage_Base::close();
|
||||
if (USocketExt::write(psocket, buffer, sizeof(buffer), 0) == sizeof(buffer))
|
||||
{
|
||||
psocket->close();
|
||||
|
||||
UClientImage_Base::setRequestProcessed();
|
||||
|
||||
UClientImage_Base::resetPipelineAndSetCloseConnection();
|
||||
}
|
||||
}
|
||||
|
||||
void UHTTP2::sendResetStream()
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#ifdef _MSWINDOWS_
|
||||
# include <ws2tcpip.h>
|
||||
#elif defined(HAVE_NETPACKET_PACKET_H) && !defined(U_ALL_CPP)
|
||||
#elif defined(HAVE_NETPACKET_PACKET_H) && (!defined(HAVE_CONFIG_H) || !defined(U_ALL_CPP))
|
||||
# include <net/if.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ UString* UHTTP::string_HTTP_Variables;
|
|||
uint32_t UHTTP::range_size;
|
||||
uint32_t UHTTP::range_start;
|
||||
uint32_t UHTTP::old_path_len;
|
||||
uint32_t UHTTP::response_code;
|
||||
uint32_t UHTTP::old_response_code;
|
||||
uint32_t UHTTP::sid_counter_gen;
|
||||
uint32_t UHTTP::sid_counter_cur;
|
||||
uint32_t UHTTP::usp_page_key_len;
|
||||
|
@ -1323,7 +1323,7 @@ void UHTTP::init()
|
|||
|
||||
U_http_info.nResponseCode = 0;
|
||||
|
||||
U_INTERNAL_ASSERT_EQUALS(response_code, HTTP_OK)
|
||||
U_INTERNAL_ASSERT_EQUALS(old_response_code, HTTP_OK)
|
||||
|
||||
U_MEMCPY(response_buffer, UClientImage_Base::iov_vec[0].iov_base, UClientImage_Base::iov_vec[0].iov_len);
|
||||
|
||||
|
@ -6199,9 +6199,11 @@ void UHTTP::setStatusDescription()
|
|||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::setStatusDescription()")
|
||||
|
||||
if (response_code != U_http_info.nResponseCode)
|
||||
U_INTERNAL_DUMP("old_response_code = %u U_http_info.nResponseCode = %u", old_response_code, U_http_info.nResponseCode)
|
||||
|
||||
if (old_response_code != U_http_info.nResponseCode)
|
||||
{
|
||||
switch ((response_code = U_http_info.nResponseCode))
|
||||
switch ((old_response_code = U_http_info.nResponseCode))
|
||||
{
|
||||
// 1xx indicates an informational message only
|
||||
case HTTP_SWITCH_PROT:
|
||||
|
@ -6317,7 +6319,7 @@ void UHTTP::setStatusDescription()
|
|||
const char* status = getStatusDescription(&sz);
|
||||
|
||||
UClientImage_Base::iov_vec[0].iov_base = response_buffer;
|
||||
UClientImage_Base::iov_vec[0].iov_len = 9+u__snprintf(response_buffer+9, sizeof(response_buffer)-9, U_CONSTANT_TO_PARAM("%u %.*s\r\n"), response_code, sz, status);
|
||||
UClientImage_Base::iov_vec[0].iov_len = 9+u__snprintf(response_buffer+9, sizeof(response_buffer)-9, U_CONSTANT_TO_PARAM("%u %.*s\r\n"), old_response_code, sz, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6739,7 +6741,7 @@ void UHTTP::setErrorResponse(const UString& content_type, int code, const char*
|
|||
char buffer[4096];
|
||||
|
||||
uint32_t len = u__snprintf(buffer, sizeof(buffer), fmt, fmt_size,
|
||||
u_xml_encode((const unsigned char*)U_http_info.uri, U_min(100, U_HTTP_URI_QUERY_LEN), (unsigned char*)output), output);
|
||||
u_xml_encode((const unsigned char*)U_http_info.uri, U_min(100, U_http_info.uri_len), (unsigned char*)output), output);
|
||||
|
||||
body.snprintf(U_CONSTANT_TO_PARAM(U_STR_FMR_BODY),
|
||||
code, sz, status,
|
||||
|
|
|
@ -309,6 +309,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -574,6 +574,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -451,6 +451,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -521,6 +521,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -458,6 +458,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -23,7 +23,7 @@ rm -f db/session.ssl* /tmp/ssl_session.txt /tmp/byterange* /tmp/soap.res /tmp/*.
|
|||
|
||||
#chmod 666 /proc/sys/net/ipv4/tcp_fin_timeout /proc/sys/net/core/somaxconn /proc/sys/net/ipv4/tcp_max_syn_backlog
|
||||
|
||||
#UTRACE="0 50M 0"
|
||||
UTRACE="0 50M 0"
|
||||
#UTRACE_SIGNAL="0 50M 0"
|
||||
#UOBJDUMP="0 10M 100"
|
||||
#USIMERR="error.sim"
|
||||
|
|
|
@ -1011,6 +1011,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -505,6 +505,7 @@ SQLITE3_INCLUDE = @SQLITE3_INCLUDE@
|
|||
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STATIC_SERVLET_MAKE = @STATIC_SERVLET_MAKE@
|
||||
STD_GNU11 = @STD_GNU11@
|
||||
STRIP = @STRIP@
|
||||
ULIB = @ULIB@
|
||||
ULIBS = @ULIBS@
|
||||
|
|
|
@ -28,7 +28,9 @@ fi
|
|||
|
||||
#STRACE=$TRUSS
|
||||
start_cmd_background "./test_rdb_server$SUFFIX inp/rdb_server.cf $ARG1 <inp/cdb.input >>out/rdb_client.out 2>>err/rdb_server.err"
|
||||
$SLEEP
|
||||
|
||||
wait_server_ready localhost 8080
|
||||
|
||||
start_prg rdb_client localhost
|
||||
|
||||
if [ "$TERM" = "msys" ] || \
|
||||
|
@ -39,8 +41,7 @@ else
|
|||
rm -f tmp/test.rdb*
|
||||
fi
|
||||
|
||||
$SLEEP
|
||||
kill_prg test_rdb_server TERM
|
||||
kill_server test_rdb_server
|
||||
|
||||
# Test against expected output
|
||||
test_output_diff rdb_client
|
||||
|
|
Loading…
Reference in New Issue
Block a user