From 639362309f4af050ad889aa5a60b4a17c5685c80 Mon Sep 17 00:00:00 2001 From: stefanocasazza Date: Sun, 3 Sep 2017 15:20:18 +0200 Subject: [PATCH] fix --- include/ulib/base/base.h | 8 +- include/ulib/base/utility.h | 11 +- include/ulib/file.h | 108 +- include/ulib/net/server/client_image.h | 2 +- include/ulib/utility/uhttp.h | 7 +- src/ulib/base/base.c | 111 +- src/ulib/base/utility.c | 2 +- src/ulib/file.cpp | 84 +- src/ulib/net/server/client_image.cpp | 123 +- src/ulib/net/server/server.cpp | 14 +- src/ulib/orm/driver/orm_driver_sqlite.cpp | 9 +- src/ulib/orm/orm.cpp | 10 +- src/ulib/string.cpp | 8 +- src/ulib/utility/uhttp.cpp | 431 ++- tests/base/test_sprintf.c | 6 +- tests/examples/FrameworkBenchmarks.sh | 40 +- tests/examples/ok/web_server_ssl.ok | 3941 ++++++++++----------- tests/ulib/test_string.cpp | 37 +- 18 files changed, 2503 insertions(+), 2449 deletions(-) diff --git a/include/ulib/base/base.h b/include/ulib/base/base.h index be38190c..6a7a3406 100644 --- a/include/ulib/base/base.h +++ b/include/ulib/base/base.h @@ -570,10 +570,10 @@ static inline bool u_is_overlap(const char* restrict dst, const char* restrict s static inline __pure const char* u_basename(const char* restrict path, uint32_t len) { - U_INTERNAL_TRACE("u_basename(%.*s,%u)", U_min(len,128), path, len) - const char* restrict ptr; + U_INTERNAL_TRACE("u_basename(%.*s,%u)", U_min(len,128), path, len) + U_INTERNAL_ASSERT_MAJOR(len, 0) U_INTERNAL_ASSERT_POINTER(path) @@ -583,7 +583,7 @@ static inline __pure const char* u_basename(const char* restrict path, uint32_t * for (ptr = path+len-2; ptr > path; --ptr) if (IS_DIR_SEPARATOR(*ptr)) return ptr+1; */ - ptr = (const char* restrict) memrchr(path, '/', len); + ptr = (const char* restrict) memrchr(path, PATH_SEPARATOR, len); return (ptr ? ptr+1 : path); } @@ -606,7 +606,7 @@ static inline const char* u_getsuffix(const char* restrict path, uint32_t len) * return (ptr && memrchr(ptr+1, '/', len-(ptr+1-path)) == 0 ? ptr : 0); */ - for (ptr = path+len-2; ptr > path; --ptr) + for (ptr = path+len-2; ptr >= path; --ptr) { c = *ptr; diff --git a/include/ulib/base/utility.h b/include/ulib/base/utility.h index eed3a6b0..cb3a94c9 100644 --- a/include/ulib/base/utility.h +++ b/include/ulib/base/utility.h @@ -221,12 +221,15 @@ U_EXPORT bool u_validate_email_address(const char* restrict address, uint32_t ad static inline bool u_isSuffixSwap(const char* restrict suffix) // NB: vi tmp... { - U_INTERNAL_TRACE("u_isSuffixSwap(%s)", suffix) + U_INTERNAL_TRACE("u_isSuffixSwap(%p)", suffix) - U_INTERNAL_ASSERT_EQUALS(suffix[0], '.') - U_INTERNAL_ASSERT_EQUALS(strchr(suffix, '/'), U_NULLPTR) + if (suffix) + { + U_INTERNAL_ASSERT_EQUALS(suffix[0], '.') + U_INTERNAL_ASSERT_EQUALS(strchr(suffix, '/'), U_NULLPTR) - if (u_get_unalignedp32(suffix) == U_MULTICHAR_CONSTANT32('.','s','w','p')) return true; + if (u_get_unalignedp32(suffix) == U_MULTICHAR_CONSTANT32('.','s','w','p')) return true; + } return false; } diff --git a/include/ulib/file.h b/include/ulib/file.h index afc23c39..b65a6e90 100644 --- a/include/ulib/file.h +++ b/include/ulib/file.h @@ -132,7 +132,14 @@ public: // PATH void setRoot(); - void setPath(const UString& path, const UString* environment = U_NULLPTR); + void setPath(const UString& path, const UString* environment = U_NULLPTR) + { + U_TRACE(0, "UFile::setPath(%V,%p)", path.rep, environment) + + pathname = path; + + setPathRelativ(environment); + } bool isRoot() const { @@ -173,31 +180,12 @@ public: U_RETURN(false); } - bool isSuffixSwap() const // NB: vi tmp... - { - U_TRACE_NO_PARAM(0, "UFile::isSuffixSwap()") - - U_INTERNAL_ASSERT_POINTER(path_relativ) - - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) - - const char* suffix = u_getsuffix(path_relativ, path_relativ_len); - - if (suffix && - u_isSuffixSwap(suffix)) - { - U_RETURN(true); - } - - U_RETURN(false); - } - // NB: the string can be not writable so path_relativ[path_relativ_len] can be != '\0'... - UString& getPath() { return pathname; } UString getName() const; UString getDirName() const; - UString getSuffix() const; + UString& getPath() { return pathname; } + UString getSuffix() const { return getSuffix(u_getsuffix(path_relativ, path_relativ_len)); } char* getPathRelativ() const { return (char*)path_relativ; } int32_t getPathRelativLen() const { return path_relativ_len; } @@ -251,7 +239,14 @@ public: } bool creat( int flags = O_TRUNC | O_RDWR, mode_t mode = PERM_FILE); - bool creat(const UString& path, int flags = O_TRUNC | O_RDWR, mode_t mode = PERM_FILE); + bool creat(const UString& path, int flags = O_TRUNC | O_RDWR, mode_t mode = PERM_FILE) + { + U_TRACE(0, "UFile::creat(%V,%d,%d)", path.rep, flags, mode) + + setPath(path); + + return creat(flags, mode); + } void reopen(int flags) { @@ -259,10 +254,10 @@ public: U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + close(); U_INTERNAL_ASSERT(pathname.isNullTerminated()) @@ -318,10 +313,10 @@ public: U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + if (U_SYSCALL(access, "%S,%d", U_PATH_CONV(path_relativ), mode) == 0) U_RETURN(true); U_RETURN(false); @@ -349,10 +344,10 @@ public: U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + if (U_SYSCALL(lstat, "%S,%p", U_PATH_CONV(path_relativ), (struct stat*)this) == 0) U_RETURN(true); U_RETURN(false); @@ -368,9 +363,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif # ifdef U_COVERITY_FALSE_POSITIVE @@ -404,9 +399,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif st_size = lseek(U_SEEK_BEGIN, SEEK_END); @@ -604,10 +599,10 @@ public: U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + if (UFile::_unlink(path_relativ)) U_RETURN(true); U_RETURN(false); @@ -634,9 +629,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif # ifdef U_COVERITY_FALSE_POSITIVE @@ -654,9 +649,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif if (fallocate(fd, n)) @@ -685,9 +680,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif return lock(fd, l_type, start, len); @@ -702,9 +697,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif return lock(fd, F_UNLCK, start, len); @@ -841,9 +836,9 @@ public: U_INTERNAL_ASSERT_DIFFERS(fd, -1) # if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) # endif # ifdef U_COVERITY_FALSE_POSITIVE @@ -1084,6 +1079,29 @@ protected: void setPathRelativ(const UString* environment = U_NULLPTR); void setPath(const UFile& file, char* buffer_path, const char* suffix, uint32_t len); + UString getSuffix(const char* ptr) const + { + U_TRACE(0, "UFile::getSuffix(%p)", ptr) + + U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) + + if (ptr) + { + U_INTERNAL_ASSERT_EQUALS(ptr[0], '.') + U_INTERNAL_ASSERT_EQUALS(strchr(ptr, '/'), U_NULLPTR) + + ptr += 1; // 1 => '.' + + UString suffix(ptr, (path_relativ + path_relativ_len) - ptr); + + U_RETURN_STRING(suffix); + } + + return UString::getStringNull(); + } + static void ftw_tree_up(); static void ftw_tree_push(); static void ftw_vector_push(); diff --git a/include/ulib/net/server/client_image.h b/include/ulib/net/server/client_image.h index df41907e..aef2bc40 100644 --- a/include/ulib/net/server/client_image.h +++ b/include/ulib/net/server/client_image.h @@ -333,7 +333,7 @@ public: static UString* rbuffer; static UString* wbuffer; static UString* request; - static bool bIPv6, bsendGzipBomp; + static bool bIPv6, bsendGzipBomb; static char cbuffer[128]; static UString* request_uri; diff --git a/include/ulib/utility/uhttp.h b/include/ulib/utility/uhttp.h index 5a06648d..02f98e3a 100644 --- a/include/ulib/utility/uhttp.h +++ b/include/ulib/utility/uhttp.h @@ -182,8 +182,6 @@ public: static UHashMap* prequestHeader; static UVector* vservice; - static const char* uri_suffix; - static const char* uri_basename; 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; @@ -892,6 +890,7 @@ public: static void callSigHUPForAllUSP(); static void callAfterForkForAllUSP(); + static bool checkForUSP(); static UServletPage* getUSP(const char* key, uint32_t key_len); // CSP (C Servlet Page) @@ -1302,7 +1301,7 @@ private: U_INTERNAL_ASSERT_POINTER(file) U_ASSERT_EQUALS(UClientImage_Base::isRequestNotFound(), false) - uri_suffix = u_getsuffix(U_FILE_TO_PARAM(*file)); + const char* uri_suffix = u_getsuffix(U_FILE_TO_PARAM(*file)); U_INTERNAL_DUMP("uri_suffix = %p", uri_suffix) @@ -1406,7 +1405,6 @@ private: static void setCGIShellScript(UString& command) U_NO_EXPORT; static bool checkIfSourceHasChangedAndCompileUSP() U_NO_EXPORT; static bool compileUSP(const char* path, uint32_t len) U_NO_EXPORT; - static void manageDataForCache(const UString& file_name) U_NO_EXPORT; static int checkGetRequestForRange(const UString& data) U_NO_EXPORT; static int sortRange(const void* a, const void* b) __pure U_NO_EXPORT; static bool addHTTPVariables(UStringRep* key, void* value) U_NO_EXPORT; @@ -1414,6 +1412,7 @@ private: static void putDataInCache(const UString& fmt, UString& content) U_NO_EXPORT; static bool readDataChunked(USocket* sk, UString* pbuffer, UString& body) U_NO_EXPORT; static void setResponseForRange(uint32_t start, uint32_t end, uint32_t header) U_NO_EXPORT; + static void manageDataForCache(const UString& basename, const UString& suffix) U_NO_EXPORT; static bool checkDataSession(const UString& token, time_t expire, UString* data) U_NO_EXPORT; static inline void resetFileCache() U_NO_EXPORT; diff --git a/src/ulib/base/base.c b/src/ulib/base/base.c index 700cac72..2c36f7f9 100644 --- a/src/ulib/base/base.c +++ b/src/ulib/base/base.c @@ -1887,13 +1887,15 @@ case_float: { double dbl = VA_ARG(double); - len = u_dtoa(dbl, bp) - bp; + U_INTERNAL_PRINT("dbl = %g", dbl) + + len = (dbl == .0 ? (*bp='0',1) : u_dtoa(dbl, bp) - bp); } else { buf[0] = '%'; - cp = buf + 1; + cp = buf+1; if ((flags & ALT) != 0) *cp++ = '#'; if ((flags & ZEROPAD) != 0) *cp++ = '0'; @@ -1901,21 +1903,108 @@ case_float: if ((flags & THOUSANDS_GROUPED) != 0) *cp++ = '\''; if (sign) *cp++ = sign; - u_put_unalignedp32(cp, U_MULTICHAR_CONSTANT32('*','.','*','L')); /* width, prec */ - - u_put_unalignedp16(cp + ((flags & LONGDBL) == 0 ? 3 : 4), U_MULTICHAR_CONSTANT16(ch,'\0')); - - if ((flags & LONGDBL) != 0) + if (prec == -1 && + width == 0) { - long double ldbl = VA_ARG(long double); + u_put_unalignedp16(cp, U_MULTICHAR_CONSTANT16(ch,'\0')); - len = sprintf(bp, (const char* restrict)buf, width, prec, ldbl); + if ((flags & LONGDBL) != 0) + { + long double ldbl = VA_ARG(long double); + + U_INTERNAL_PRINT("buf = %s ldbl = %Lg", buf, ldbl) + + len = sprintf(bp, (const char* restrict)buf, ldbl); + } + else + { + double dbl = VA_ARG(double); + + U_INTERNAL_PRINT("buf = %s dbl = %g", buf, dbl) + + len = sprintf(bp, (const char* restrict)buf, dbl); + } } else { - double dbl = VA_ARG(double); + if (width == 0) + { + u_put_unalignedp32(cp, U_MULTICHAR_CONSTANT32('.','*','L','\0')); /* prec, prefix long double */ - len = sprintf(bp, (const char* restrict)buf, width, prec, dbl); + if ((flags & LONGDBL) != 0) + { + long double ldbl = VA_ARG(long double); + + u_put_unalignedp16(cp+3, U_MULTICHAR_CONSTANT16(ch,'\0')); + + U_INTERNAL_PRINT("buf = %s prec = %d ldbl = %Lg", buf, prec, ldbl) + + len = sprintf(bp, (const char* restrict)buf, prec, ldbl); + } + else + { + double dbl = VA_ARG(double); + + u_put_unalignedp16(cp+2, U_MULTICHAR_CONSTANT16(ch,'\0')); + + U_INTERNAL_PRINT("buf = %s prec = %d dbl = %g", buf, prec, dbl) + + len = sprintf(bp, (const char* restrict)buf, prec, dbl); + } + } + else if (prec == -1) + { + u_put_unalignedp16(cp, U_MULTICHAR_CONSTANT16('*','L')); /* width, prefix long double */ + + if ((flags & LONGDBL) != 0) + { + long double ldbl = VA_ARG(long double); + + u_put_unalignedp16(cp+2, U_MULTICHAR_CONSTANT16(ch,'\0')); + + U_INTERNAL_PRINT("buf = %s width = %u ldbl = %Lg", buf, ldbl) + + len = sprintf(bp, (const char* restrict)buf, width, ldbl); + } + else + { + double dbl = VA_ARG(double); + + u_put_unalignedp16(cp+1, U_MULTICHAR_CONSTANT16(ch,'\0')); + + U_INTERNAL_PRINT("buf = %s width = %u dbl = %g", buf, dbl) + + len = sprintf(bp, (const char* restrict)buf, width, dbl); + } + } + else + { + U_INTERNAL_ASSERT_DIFFERS(prec, -1) + U_INTERNAL_ASSERT_DIFFERS(width, 0) + + u_put_unalignedp32(cp, U_MULTICHAR_CONSTANT32('*','.','*','L')); /* width, prec, prefix long double */ + + if ((flags & LONGDBL) != 0) + { + long double ldbl = VA_ARG(long double); + + u_put_unalignedp16(cp+4, U_MULTICHAR_CONSTANT16(ch,'\0')); + + U_INTERNAL_PRINT("buf = %s width = %u prec = %d ldbl = %Lg", buf, width, prec, ldbl) + + len = sprintf(bp, (const char* restrict)buf, width, prec, ldbl); + } + else + { + double dbl = VA_ARG(double); + + u_put_unalignedp16(cp+3, U_MULTICHAR_CONSTANT16(ch,'\0')); + + U_INTERNAL_PRINT("buf = %s width = %u prec = %d dbl = %g", buf, width, prec, dbl) + + len = sprintf(bp, (const char* restrict)buf, width, prec, dbl); + } + } } U_INTERNAL_ASSERT_EQUALS(len, strlen(bp)) diff --git a/src/ulib/base/utility.c b/src/ulib/base/utility.c index d6c88da6..349e0bbf 100644 --- a/src/ulib/base/utility.c +++ b/src/ulib/base/utility.c @@ -3595,7 +3595,7 @@ __pure int u_isUTF16(const unsigned char* restrict buf, uint32_t len) */ #define U__S 0x00000001 /* character space ' ' (32 0x20) */ -#define U__E 0x00000002 /* character used in printf format */ +#define U__E 0x00000002 /* character used in printf format */ #define U__H 0x00000004 /* character '+' (43 0x2B) */ #define U__V 0x00000008 /* character ',' (44 0x2C) */ #define U__O 0x00000010 /* character minus '-' (45 0x2D) */ diff --git a/src/ulib/file.cpp b/src/ulib/file.cpp index ae12f429..a8346ee1 100644 --- a/src/ulib/file.cpp +++ b/src/ulib/file.cpp @@ -135,15 +135,6 @@ void UFile::setRoot() // gcc - call is unlikely and code size would grow -void UFile::setPath(const UString& path, const UString* environment) -{ - U_TRACE(0, "UFile::setPath(%V,%p)", path.rep, environment) - - pathname = path; - - setPathRelativ(environment); -} - bool UFile::open(int flags) { U_TRACE(0, "UFile::open(%d)", flags) @@ -151,11 +142,12 @@ bool UFile::open(int flags) U_CHECK_MEMORY U_INTERNAL_ASSERT_EQUALS(fd, -1) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_ASSERT_MAJOR(path_relativ_len, 0) U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + U_INTERNAL_ASSERT_MAJOR(path_relativ_len, 0) + fd = UFile::open(path_relativ, flags, PERM_FILE); if (fd != -1) U_RETURN(true); @@ -184,10 +176,11 @@ bool UFile::creat(int flags, mode_t mode) U_CHECK_MEMORY U_INTERNAL_ASSERT_EQUALS(fd, -1) - U_INTERNAL_ASSERT_POINTER(path_relativ) U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + fd = UFile::open(path_relativ, O_CREAT | flags, mode); if (fd != -1) U_RETURN(true); @@ -195,25 +188,16 @@ bool UFile::creat(int flags, mode_t mode) U_RETURN(false); } -bool UFile::creat(const UString& path, int flags, mode_t mode) -{ - U_TRACE(0, "UFile::creat(%V,%d,%d)", path.rep, flags, mode) - - setPath(path); - - return creat(flags, mode); -} - bool UFile::stat() { U_TRACE_NO_PARAM(1, "UFile::stat()") U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + st_ino = 0; bool result = (U_SYSCALL(stat, "%S,%p", U_PATH_CONV(path_relativ), (struct stat*)this) == 0); @@ -706,10 +690,10 @@ bool UFile::memmap(int prot, UString* str, uint32_t offset, uint32_t length) U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + U_INTERNAL_ASSERT_DIFFERS(fd, -1) U_INTERNAL_ASSERT_MAJOR(st_size, 0) @@ -781,10 +765,10 @@ void UFile::munmap() U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + U_INTERNAL_ASSERT_MAJOR(map_size,0UL) U_INTERNAL_ASSERT_DIFFERS(map,(char*)MAP_FAILED) @@ -821,9 +805,9 @@ UString UFile::_getContent(bool bsize, bool brdonly, bool bmap) U_INTERNAL_ASSERT_DIFFERS(fd, -1) #if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) #endif # ifdef U_COVERITY_FALSE_POSITIVE @@ -933,10 +917,10 @@ bool UFile::creatForWrite(int flags, bool bmkdirs) { U_TRACE(1, "UFile::creatForWrite(%d,%b)", flags, bmkdirs) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + bool esito = isOpen(); if (esito == false) @@ -1161,10 +1145,10 @@ bool UFile::ftruncate(uint32_t n) U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + U_INTERNAL_ASSERT_DIFFERS(fd, -1) #if defined(__CYGWIN__) || defined(_MSWINDOWS_) U_INTERNAL_ASSERT_EQUALS(map, (char*)MAP_FAILED) @@ -1316,9 +1300,9 @@ bool UFile::pread(void* buf, uint32_t count, uint32_t offset) U_INTERNAL_ASSERT_DIFFERS(fd, -1) #if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) #endif #ifdef U_COVERITY_FALSE_POSITIVE @@ -1339,9 +1323,9 @@ bool UFile::pwrite(const void* _buf, uint32_t count, uint32_t offset) U_INTERNAL_ASSERT_DIFFERS(fd, -1) #if defined(DEBUG) && !defined(U_LINUX) && !defined(O_TMPFILE) - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + + U_INTERNAL_ASSERT_POINTER(path_relativ) #endif #ifdef U_COVERITY_FALSE_POSITIVE @@ -1611,10 +1595,10 @@ bool UFile::_rename(const char* newpath) U_CHECK_MEMORY - U_INTERNAL_ASSERT_POINTER(path_relativ) - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) + U_INTERNAL_ASSERT_POINTER(path_relativ) + bool result = UFile::_rename(path_relativ, newpath); if (result) @@ -1665,28 +1649,6 @@ void UFile::substitute(UFile& file) if (fd != -1) UFile::fsync(); } -UString UFile::getSuffix() const -{ - U_TRACE_NO_PARAM(0, "UFile::getSuffix()") - - U_INTERNAL_ASSERT_POINTER(path_relativ) - - U_INTERNAL_DUMP("path_relativ(%u) = %.*S", path_relativ_len, path_relativ_len, path_relativ) - - UString suffix; - const char* ptr = u_getsuffix(path_relativ, path_relativ_len); - - if (ptr) - { - U_INTERNAL_ASSERT_EQUALS(ptr[0], '.') - U_INTERNAL_ASSERT_EQUALS(strchr(ptr, '/'), U_NULLPTR) - - (void) suffix.assign(ptr+1, (path_relativ + path_relativ_len) - (1 + ptr)); // 1 => '.' - } - - U_RETURN_STRING(suffix); -} - // MIME TYPE const char* UFile::getMimeType(const char* suffix, int* pmime_index) diff --git a/src/ulib/net/server/client_image.cpp b/src/ulib/net/server/client_image.cpp index 95c9b173..9a4599e8 100644 --- a/src/ulib/net/server/client_image.cpp +++ b/src/ulib/net/server/client_image.cpp @@ -29,7 +29,7 @@ int UClientImage_Base::idx; int UClientImage_Base::csfd; int UClientImage_Base::iovcnt; bool UClientImage_Base::bIPv6; -bool UClientImage_Base::bsendGzipBomp; +bool UClientImage_Base::bsendGzipBomb; char UClientImage_Base::cbuffer[128]; long UClientImage_Base::time_run; long UClientImage_Base::time_between_request = 10; @@ -45,8 +45,8 @@ UString* UClientImage_Base::request; UString* UClientImage_Base::request_uri; UString* UClientImage_Base::environment; UTimeVal* UClientImage_Base::chronometer; -struct iovec UClientImage_Base::iov_sav[4]; struct iovec UClientImage_Base::iov_vec[4]; +struct iovec UClientImage_Base::iov_sav[4]; struct iovec* UClientImage_Base::piov; iPF UClientImage_Base::callerHandlerRead = UServer_Base::pluginsHandlerREAD; @@ -1019,12 +1019,10 @@ void UClientImage_Base::prepareForRead() #ifdef U_EVASIVE_SUPPORT if (UServer_Base::checkHitSiteStats()) { - if (U_http_version == '1' && - U_http_is_accept_gzip && - UHTTP::file_gzip_bomb && + if (UHTTP::file_gzip_bomb && UServer_Base::bssl == false) { - bsendGzipBomp = true; + bsendGzipBomb = true; } else { @@ -1139,11 +1137,6 @@ int UClientImage_Base::handlerRead() // Connection-wide hooks int result; uint32_t sz; - const char* ptr1; - /* - const char* ptr2; - UHTTP::UServletPage* usp; - */ prepareForRead(); @@ -1269,109 +1262,9 @@ data_missing: resetBuffer(); - /* - ptr1 = rbuffer->c_pointer(3); - ptr2 = ptr1 + 8; - - if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','c','a','c','h','e','d') && - u_get_unalignedp64(ptr2) == U_MULTICHAR_CONSTANT64('_','w','o','r','l','d','s','?')) - { - usp = UHTTP::vusp->at(0); - - for (ptr1 = U_http_info.query = ptr2 + 8 + U_CONSTANT_SIZE("queries"); *ptr1 != ' '; ++ptr1) {} - - U_http_info.query_len = ptr1 - U_http_info.query; - - U_INTERNAL_DUMP("query = %.*S", U_HTTP_QUERY_TO_TRACE) - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','d','b',' ','H','T','T')) - { - usp = UHTTP::vusp->at(1); - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','f','o','r','t','u','n') && - u_get_unalignedp64(ptr2) == U_MULTICHAR_CONSTANT64('e',' ','H','T','T','P','/','1')) - { - usp = UHTTP::vusp->at(2); - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','j','s','o','n',' ','H')) - { - usp = UHTTP::vusp->at(3); - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','m','d','b',' ','H','T')) - { - usp = UHTTP::vusp->at(4); - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','m','f','o','r','t','u') && - u_get_unalignedp64(ptr2) == U_MULTICHAR_CONSTANT64('n','e',' ','H','T','T','P','/')) - { - usp = UHTTP::vusp->at(5); - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','m','q','u','e','r','y') && - u_get_unalignedp64(ptr2) == U_MULTICHAR_CONSTANT64('?','q','u','e','r','i','e','s')) - { - usp = UHTTP::vusp->at(6); - - for (ptr1 = U_http_info.query = ptr2 + 8; *ptr1 != ' '; ++ptr1) {} - - U_http_info.query_len = ptr1 - U_http_info.query; - - U_INTERNAL_DUMP("query = %.*S", U_HTTP_QUERY_TO_TRACE) - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','m','u','p','d','a','t') && - u_get_unalignedp64(ptr2) == U_MULTICHAR_CONSTANT64('e','?','q','u','e','r','i','e')) - { - usp = UHTTP::vusp->at(7); - - for (ptr1 = U_http_info.query = ptr2 + 8 + 1; *ptr1 != ' '; ++ptr1) {} - - U_http_info.query_len = ptr1 - U_http_info.query; - - U_INTERNAL_DUMP("query = %.*S", U_HTTP_QUERY_TO_TRACE) - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','q','u','e','r','y','?')) - { - usp = UHTTP::vusp->at(9); - - for (ptr1 = U_http_info.query = ptr2 + U_CONSTANT_SIZE("queries"); *ptr1 != ' '; ++ptr1) {} - - U_http_info.query_len = ptr1 - U_http_info.query; - - U_INTERNAL_DUMP("query = %.*S", U_HTTP_QUERY_TO_TRACE) - } - else if (u_get_unalignedp64(ptr1) == U_MULTICHAR_CONSTANT64(' ','/','u','p','d','a','t','e') && - u_get_unalignedp64(ptr2) == U_MULTICHAR_CONSTANT64('?','q','u','e','r','i','e','s')) - { - usp = UHTTP::vusp->at(10); - - for (ptr1 = U_http_info.query = ptr2 + 8; *ptr1 != ' '; ++ptr1) {} - - U_http_info.query_len = ptr1 - U_http_info.query; - - U_INTERNAL_DUMP("query = %.*S", U_HTTP_QUERY_TO_TRACE) - } - else - { - U_INTERNAL_DUMP("ptr1 = %.16S", ptr1) - - goto next1; - } - - U_http_content_type_len = 0; - - U_http_info.nResponseCode = HTTP_OK; - - usp->runDynamicPage(0); - - UHTTP::setDynamicResponse(); - - UHTTP::ext->clear(); - - (void) writeResponse(); - - U_RETURN(U_NOTIFIER_OK); - -next1: - */ +#if defined(U_SERVER_CAPTIVE_PORTAL) && defined(ENABLE_THREAD) + if (UHTTP::checkForUSP()) U_RETURN(U_NOTIFIER_OK); +#endif size_request = U_ClientImage_request = 0; @@ -1438,7 +1331,7 @@ next2: } else if (size_request < sz) // we check if we have a pipeline... { - ptr1 = rbuffer->c_pointer(size_request); + const char* ptr1 = rbuffer->c_pointer(size_request); if (UNLIKELY(u__isspace(*ptr1))) while (u__isspace(*++ptr1)) {} diff --git a/src/ulib/net/server/server.cpp b/src/ulib/net/server/server.cpp index 757353f7..cc2507bb 100644 --- a/src/ulib/net/server/server.cpp +++ b/src/ulib/net/server/server.cpp @@ -1841,14 +1841,14 @@ void UServer_Base::loadConfigParam() if (preforked_num_kids > 1) monitoring_process = true; #ifdef USE_LIBSSL - *password = cfg->at(U_CONSTANT_TO_PARAM("PASSWORD")); - *ca_file = cfg->at(U_CONSTANT_TO_PARAM("CA_FILE")); - *ca_path = cfg->at(U_CONSTANT_TO_PARAM("CA_PATH")); - *key_file = cfg->at(U_CONSTANT_TO_PARAM("KEY_FILE")); - *cert_file = cfg->at(U_CONSTANT_TO_PARAM("CERT_FILE")); + *dh_file = cfg->at(U_CONSTANT_TO_PARAM("DH_FILE")); + *ca_file = cfg->at(U_CONSTANT_TO_PARAM("CA_FILE")); + *ca_path = cfg->at(U_CONSTANT_TO_PARAM("CA_PATH")); + *key_file = cfg->at(U_CONSTANT_TO_PARAM("KEY_FILE")); + *password = cfg->at(U_CONSTANT_TO_PARAM("PASSWORD")); + *cert_file = cfg->at(U_CONSTANT_TO_PARAM("CERT_FILE")); - *dh_file = cfg->at(U_CONSTANT_TO_PARAM("DH_FILE")); - verify_mode = cfg->at(U_CONSTANT_TO_PARAM("VERIFY_MODE")); + verify_mode = cfg->readLong(U_CONSTANT_TO_PARAM("VERIFY_MODE")); if (bssl) min_size_for_sendfile = U_NOT_FOUND; // NB: we can't use sendfile with SSL... #endif diff --git a/src/ulib/orm/driver/orm_driver_sqlite.cpp b/src/ulib/orm/driver/orm_driver_sqlite.cpp index d5022a2e..792a65b4 100644 --- a/src/ulib/orm/driver/orm_driver_sqlite.cpp +++ b/src/ulib/orm/driver/orm_driver_sqlite.cpp @@ -29,8 +29,6 @@ void UOrmDriverSqlite::handlerError() { U_TRACE_NO_PARAM(0, "UOrmDriverSqlite::handlerError()") - U_INTERNAL_ASSERT_POINTER(UOrmDriver::connection) - // Translation table for error status codes struct error_value_info { @@ -76,8 +74,11 @@ void UOrmDriverSqlite::handlerError() U_ENTRY(SQLITE_DONE) /* sqlite3_step() has finished executing */ }; - if (UOrmDriver::errmsg == U_NULLPTR) UOrmDriver::errmsg = U_SYSCALL(sqlite3_errmsg, "%p", (sqlite3*)UOrmDriver::connection); - if (UOrmDriver::errcode == 0) UOrmDriver::errcode = U_SYSCALL(sqlite3_errcode, "%p", (sqlite3*)UOrmDriver::connection); + if (UOrmDriver::connection) + { + if (UOrmDriver::errmsg == U_NULLPTR) UOrmDriver::errmsg = U_SYSCALL(sqlite3_errmsg, "%p", (sqlite3*)UOrmDriver::connection); + if (UOrmDriver::errcode == 0) UOrmDriver::errcode = U_SYSCALL(sqlite3_errcode, "%p", (sqlite3*)UOrmDriver::connection); + } if (UOrmDriver::errcode >= 0 && UOrmDriver::errcode < (int)U_NUM_ELEMENTS(error_value_table) && diff --git a/src/ulib/orm/orm.cpp b/src/ulib/orm/orm.cpp index 5a7cc68d..6bcec4fd 100644 --- a/src/ulib/orm/orm.cpp +++ b/src/ulib/orm/orm.cpp @@ -209,12 +209,12 @@ UOrmStatement::UOrmStatement(UOrmSession& session, const char* stmt, uint32_t le pdrv = (psession = &session)->pdrv; pstmt = pdrv->handlerStatementCreation(stmt, len); - U_INTERNAL_DUMP("psession = %p pdrv = %p", psession, pdrv) - } - else - { - if (UOrmDriver::env_driver_len) UOrmSession::loadDriverFail(UOrmDriver::env_driver, UOrmDriver::env_driver_len); + U_INTERNAL_DUMP("psession = %p pdrv = %p pstmt = %p", psession, pdrv, pstmt) + + if (pstmt) return; } + + if (UOrmDriver::env_driver_len) UOrmSession::loadDriverFail(UOrmDriver::env_driver, UOrmDriver::env_driver_len); #endif } diff --git a/src/ulib/string.cpp b/src/ulib/string.cpp index 65cfd466..fada9c3c 100644 --- a/src/ulib/string.cpp +++ b/src/ulib/string.cpp @@ -1979,9 +1979,13 @@ double UString::strtod() const UValue json; - if (json.parse(*this)) return json.getDouble(); + if (equal("0", 1) == false && + json.parse(*this)) + { + return json.getDouble(); + } - U_RETURN(0); + U_RETURN(.0); } void UString::printKeyValue(const char* key, uint32_t keylen, const char* _data, uint32_t datalen) diff --git a/src/ulib/utility/uhttp.cpp b/src/ulib/utility/uhttp.cpp index d3c50d6f..79e8fcef 100644 --- a/src/ulib/utility/uhttp.cpp +++ b/src/ulib/utility/uhttp.cpp @@ -110,8 +110,6 @@ uint32_t UHTTP::limit_request_body = U_STRING_MAX_SIZE; uint32_t UHTTP::request_read_timeout; UCommand* UHTTP::pcmd; -const char* UHTTP::uri_suffix; -const char* UHTTP::uri_basename; UDataSession* UHTTP::data_session; UDataSession* UHTTP::data_storage; UMimeMultipart* UHTTP::formMulti; @@ -816,6 +814,8 @@ U_NO_EXPORT void UHTTP::loadStaticLinkedServlet(const char* name, uint32_t len, if (pathname->equal(U_CONSTANT_TO_PARAM("wi_auth"))) (void) pathname->insert(0, U_CONSTANT_TO_PARAM(WI_AUTH_DOMAIN "/servlet/")); # endif + U_ASSERT_EQUALS(cache_file->find(*pathname), false) + cache_file->insert(*pathname, file_data); // NB: we don't need to call u_construct()... U_SRV_LOG("linked static servlet: %.*S, USP service registered (URI): %V", len, name, pathname->rep); @@ -3597,16 +3597,16 @@ U_NO_EXPORT bool UHTTP::callService() pathname->setBuffer(U_CAPACITY); - uri_suffix = u_getsuffix(U_FILE_TO_PARAM(*file)); + const char* suffix = u_getsuffix(U_FILE_TO_PARAM(*file)); - if (uri_suffix) pathname->snprintf(U_CONSTANT_TO_PARAM("%.*s"), U_FILE_TO_TRACE(*file)); - else pathname->snprintf(U_CONSTANT_TO_PARAM("%.*s.%s"), U_FILE_TO_TRACE(*file), U_LIB_SUFFIX); + if (suffix) pathname->snprintf(U_CONSTANT_TO_PARAM("%.*s"), U_FILE_TO_TRACE(*file)); + else pathname->snprintf(U_CONSTANT_TO_PARAM("%.*s.%s"), U_FILE_TO_TRACE(*file), U_LIB_SUFFIX); file->setPath(*pathname); while (file->stat() == false) { - if (uri_suffix) U_RETURN(false); + if (suffix) U_RETURN(false); pathname->setBuffer(U_CAPACITY); @@ -3614,14 +3614,14 @@ U_NO_EXPORT bool UHTTP::callService() file->setPath(*pathname); - uri_suffix = (const char*)U_INT2PTR(0xffff); + suffix = ".usp"; } U_INTERNAL_DUMP("U_http_is_nocache_file = %b", U_http_is_nocache_file) if (U_http_is_nocache_file == false) { - manageDataForCache(UStringExt::basename(file->getPath())); + manageDataForCache(UStringExt::basename(file->getPath()), file->getSuffix()); if (file_data) { @@ -4096,37 +4096,45 @@ int UHTTP::handlerREAD() # endif } - U_INTERNAL_DUMP("UClientImage_Base::size_request = %u UClientImage_Base::bsendGzipBomp = %b", UClientImage_Base::size_request, UClientImage_Base::bsendGzipBomp) + U_INTERNAL_DUMP("UClientImage_Base::size_request = %u UClientImage_Base::bsendGzipBomb = %b", UClientImage_Base::size_request, UClientImage_Base::bsendGzipBomb) #ifndef U_SERVER_CAPTIVE_PORTAL - if (UClientImage_Base::bsendGzipBomp) + if (UClientImage_Base::bsendGzipBomb) { U_INTERNAL_ASSERT_EQUALS(UServer_Base::bssl, false) // NB: we can't use sendfile with SSL... - UClientImage_Base::bsendGzipBomp = false; + UClientImage_Base::bsendGzipBomb = false; - U_DEBUG("we strike back sending gzip bomb...", 0); + if (U_http_version == '1' && + U_http_is_accept_gzip) + { + U_DEBUG("we strike back sending gzip bomb...", 0); - U_SRV_LOG("we strike back sending gzip bomb...", 0); + U_SRV_LOG("we strike back sending gzip bomb...", 0); - if (UServer_Base::startParallelization()) U_RETURN(U_PLUGIN_HANDLER_FINISHED); // parent + if (UServer_Base::startParallelization()) U_RETURN(U_PLUGIN_HANDLER_FINISHED); // parent - UClientImage_Base::body->clear(); + UClientImage_Base::body->clear(); - UClientImage_Base::setCloseConnection(); + UClientImage_Base::setCloseConnection(); - U_http_flag |= HTTP_IS_RESPONSE_GZIP | HTTP_IS_SENDFILE; - U_ClientImage_request |= UClientImage_Base::ALREADY_PROCESSED | UClientImage_Base::NO_CACHE; + U_http_flag |= HTTP_IS_RESPONSE_GZIP | HTTP_IS_SENDFILE; + U_ClientImage_request |= UClientImage_Base::ALREADY_PROCESSED | UClientImage_Base::NO_CACHE; - UClientImage_Base::setSendfile(file_gzip_bomb->fd, 0, file_gzip_bomb->size); + UClientImage_Base::setSendfile(file_gzip_bomb->fd, 0, file_gzip_bomb->size); - U_http_info.nResponseCode = HTTP_OK; + U_http_info.nResponseCode = HTTP_OK; - *ext = file_gzip_bomb->array->operator[](0); + *ext = file_gzip_bomb->array->operator[](0); - handlerResponse(); + handlerResponse(); - U_RETURN(U_PLUGIN_HANDLER_FINISHED); + U_RETURN(U_PLUGIN_HANDLER_FINISHED); + } + + UClientImage_Base::abortive_close(); + + U_RETURN(U_PLUGIN_HANDLER_ERROR); } #endif @@ -4222,7 +4230,7 @@ int UHTTP::manageRequest() // manage global alias - U_INTERNAL_DUMP("global_alias = %b UClientImage_Base::request_uri(%u) = %V", + U_INTERNAL_DUMP("global_alias = %p UClientImage_Base::request_uri(%u) = %V", global_alias, UClientImage_Base::request_uri->size(), UClientImage_Base::request_uri->rep) if (global_alias && @@ -4403,7 +4411,7 @@ manage: file->setPath(*pathname); - manageDataForCache(UStringExt::basename(file->getPath())); + manageDataForCache(UStringExt::basename(file->getPath()), U_STRING_FROM_CONSTANT("usp")); if (file_data) UClientImage_Base::setRequestInFileCache(); } @@ -6764,7 +6772,8 @@ void UHTTP::setRedirectResponse(int mode, const char* ptr_location, uint32_t len if ((mode & NETWORK_AUTHENTICATION_REQUIRED) != 0) { - len = u__snprintf(msg, sizeof(msg), U_CONSTANT_TO_PARAM("You need to authenticate with the local network in order to get access"), len_location, ptr_location); + len = u__snprintf(msg, sizeof(msg), U_CONSTANT_TO_PARAM("You need to authenticate with the local network in order to get access"), + len_location, ptr_location); } else { @@ -6792,7 +6801,7 @@ void UHTTP::setErrorResponse(const UString& content_type, int code, const char* U_INTERNAL_ASSERT(U_IS_HTTP_ERROR(code)) - UClientImage_Base::setCloseConnection(); + if (code != HTTP_UNAUTHORIZED) UClientImage_Base::setCloseConnection(); U_INTERNAL_DUMP("U_http_is_request_nostat = %b U_HTTP_URI_QUERY_LEN = %u", U_http_is_request_nostat, U_HTTP_URI_QUERY_LEN) @@ -7055,18 +7064,49 @@ U_NO_EXPORT bool UHTTP::processAuthorization() { U_TRACE_NO_PARAM(0, "UHTTP::processAuthorization()") + UTokenizer t; + uint32_t sz, pos = 0; bool result = false, bpass = false; - const char* ptr = getHeaderValuePtr(U_CONSTANT_TO_PARAM("Authorization"), false); + const char* ptr = UClientImage_Base::getRequestUri(sz); + UString buffer(100U), fpasswd, content, tmp, user(100U); + const char* uri_suffix = u_getsuffix(ptr, sz); + + if (uri_suffix) + { + U_INTERNAL_ASSERT_EQUALS(uri_suffix[0], '.') + + pos = (ptr + sz) - uri_suffix; + } + + U_INTERNAL_DUMP("digest_authentication = %b", digest_authentication) + + buffer.snprintf(U_CONSTANT_TO_PARAM("..%.*s.ht%6s"), sz-pos, ptr, digest_authentication ? "digest" : "passwd"); + + UHTTP::UFileCacheData* ptr_file_data = cache_file->at(U_STRING_TO_PARAM(buffer)); + + U_INTERNAL_DUMP("ptr_file_data = %p htpasswd = %p", ptr_file_data, htpasswd) + + if (ptr_file_data) fpasswd = ptr_file_data->array->operator[](0); + else + { + if (digest_authentication) + { + if (htdigest) fpasswd = *htdigest; + } + else + { + if (htpasswd) fpasswd = *htpasswd; + } + } + + if (fpasswd.empty()) goto end; + + bpass = true; + + ptr = getHeaderValuePtr(U_CONSTANT_TO_PARAM("Authorization"), false); if (ptr) { - UTokenizer t; - uint32_t sz, pos = 0; - UHTTP::UFileCacheData* ptr_file_data; - UString content, tmp, user(100U), buffer(100U), fpasswd; - - U_INTERNAL_DUMP("digest_authentication = %b", digest_authentication) - if (digest_authentication) { if (u_get_unalignedp32(ptr) != U_MULTICHAR_CONSTANT32('D','i','g','e')) goto end; @@ -7087,40 +7127,6 @@ U_NO_EXPORT bool UHTTP::processAuthorization() if (t.next(content, (bool*)U_NULLPTR) == false) goto end; - ptr = UClientImage_Base::getRequestUri(sz); - - uri_suffix = u_getsuffix(ptr, sz); - - if (uri_suffix) - { - U_INTERNAL_ASSERT_EQUALS(uri_suffix[0], '.') - - pos = (ptr + sz) - uri_suffix; - } - - buffer.snprintf(U_CONSTANT_TO_PARAM("..%.*s.ht%6s"), sz-pos, ptr, digest_authentication ? "digest" : "passwd"); - - ptr_file_data = cache_file->at(U_STRING_TO_PARAM(buffer)); - - U_INTERNAL_DUMP("ptr_file_data = %p htpasswd = %p", ptr_file_data, htpasswd) - - if (ptr_file_data) fpasswd = ptr_file_data->array->operator[](0); - else - { - if (digest_authentication) - { - if (htdigest) fpasswd = *htdigest; - } - else - { - if (htpasswd) fpasswd = *htpasswd; - } - } - - if (fpasswd.empty()) goto end; - - bpass = true; - if (digest_authentication) { /** @@ -7313,8 +7319,8 @@ U_NO_EXPORT bool UHTTP::processAuthorization() } } } -end: - U_SRV_LOG("%srequest authorization for user %V %s", result ? "" : "WARNING: ", user.rep, result ? "success" : "failed"); + +end: U_SRV_LOG("%srequest authorization for user %V %s", result ? "" : "WARNING: ", user.rep, result ? "success" : "failed"); } if (result == false) @@ -7585,7 +7591,9 @@ not_found: int32_t cmp = -1, probe, low = -1; const char* target = UClientImage_Base::getRequestUri(target_len); - if (target[0] != '/') goto not_found; // NB: skip '/'... + // NB: skip first char of uri ('/')... + + U_INTERNAL_ASSERT_EQUALS(target[0], '/') target += 1; target_len -= 1; @@ -7594,43 +7602,45 @@ not_found: if (target_len == 0) goto not_found; // NB: skip '/' request... + if (u_getsuffix(target, target_len) != U_NULLPTR) goto end; // NB: if we have a suffix (Ex: something.sh) we go to the next phase of request processing... + U_http_info.nResponseCode = 0; // NB: it is used by server_plugin_ssi to continue processing with a shell script... - if (u_getsuffix(target, target_len) == U_NULLPTR) // NB: else we go to the next phase of request processing... + while ((high - low) > 1) { - while ((high - low) > 1) - { - probe = ((low + high) & 0xFFFFFFFFL) >> 1; + probe = ((low + high) & 0xFFFFFFFFL) >> 1; - U_INTERNAL_DUMP("low = %d high = %d probe = %d", low, high, probe) + U_INTERNAL_DUMP("low = %d high = %d probe = %d", low, high, probe) - key = table + probe; + key = table + probe; - U_INTERNAL_DUMP("key(%u) = %.*S", key->len, key->len, key->name) + U_INTERNAL_DUMP("key(%u) = %.*S", key->len, key->len, key->name) - cmp = memcmp(key->name, target, U_min(key->len, target_len)); + cmp = memcmp(key->name, target, U_min(key->len, target_len)); - if (cmp == 0) cmp = (key->len - target_len); + if (cmp == 0) cmp = (key->len - target_len); - if (cmp > 0) high = probe; - else if (cmp == 0) goto found; - else low = probe; - } + if (cmp > 0) high = probe; + else if (cmp == 0) goto found; + else low = probe; + } - if (low == -1 || - (key = table + low, key->len != target_len || memcmp(key->name, target, target_len))) - { - goto not_found; - } + if (low == -1 || + (key = table + low, key->len != target_len || memcmp(key->name, target, target_len))) + { + goto not_found; + } - probe = low; + probe = low; found: - table[probe].function(); + table[probe].function(); - U_INTERNAL_DUMP("U_http_info.nResponseCode = %u", U_http_info.nResponseCode) + U_INTERNAL_DUMP("U_http_info.nResponseCode = %u", U_http_info.nResponseCode) - if (U_http_info.nResponseCode == 0) (void) UClientImage_Base::environment->append(U_CONSTANT_TO_PARAM("HTTP_RESPONSE_CODE=0\n")); + if (U_http_info.nResponseCode == 0) + { +end: (void) UClientImage_Base::environment->append(U_CONSTANT_TO_PARAM("HTTP_RESPONSE_CODE=0\n")); } } @@ -7986,13 +7996,15 @@ void UHTTP::checkFileForCache() file->setPath(*pathname); - UString file_name = UStringExt::basename(file->getPath()); + UString basename = UStringExt::basename(file->getPath()); - U_INTERNAL_ASSERT(file_name) + U_INTERNAL_ASSERT(basename) + + const char* suffix = u_getsuffix(U_STRING_TO_PARAM(basename)); #ifdef DEBUG - if (file->isSuffixSwap() || // NB: vi tmp... - UServices::dosMatchExtWithOR(file_name, U_CONSTANT_TO_PARAM("stack.*.[0-9]*|mempool.*.[0-9]*|trace.*.[0-9]*|*usp_translator*"), 0)) + if (u_isSuffixSwap(suffix) || // NB: vi tmp... + UServices::dosMatchExtWithOR(basename, U_CONSTANT_TO_PARAM("stack.*.[0-9]*|mempool.*.[0-9]*|trace.*.[0-9]*|*usp_translator*"), 0)) { return; } @@ -8002,45 +8014,37 @@ void UHTTP::checkFileForCache() { U_INTERNAL_DUMP("nocache_file_mask = %p U_http_is_nocache_file = %b", nocache_file_mask, U_http_is_nocache_file) - if (U_http_is_nocache_file || - (nocache_file_mask && - UServices::dosMatchWithOR(file_name, U_STRING_TO_PARAM(*nocache_file_mask), 0))) + if (U_http_is_nocache_file == false && + (nocache_file_mask == U_NULLPTR || + UServices::dosMatchWithOR(basename, U_STRING_TO_PARAM(*nocache_file_mask), 0) == false)) { - return; - } + if (pathname->equal(U_FILE_TO_PARAM(*file)) == false) (void) pathname->replace(U_FILE_TO_PARAM(*file)); // NB: it can happen with inotify... - manageDataForCache(file_name); + manageDataForCache(basename, file->getSuffix(suffix)); + } } } -U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) +U_NO_EXPORT void UHTTP::manageDataForCache(const UString& basename, const UString& suffix) { - U_TRACE(1, "UHTTP::manageDataForCache(%V)", file_name.rep) + U_TRACE(1, "UHTTP::manageDataForCache(%V,%V)", basename.rep, suffix.rep) - UString suffix; const char* ctype; - uint32_t suffix_len; const char* suffix_ptr; - - uint32_t file_name_len = file_name.size(); - const char* file_name_ptr = file_name.data(); + const char* basename_ptr; + uint32_t suffix_len, basename_len; uint32_t file_len = file->getPathRelativLen(); const char* file_ptr = file->getPathRelativ(); U_INTERNAL_DUMP("pathname = %V file = %.*S rpathname = %V", pathname->rep, file_len, file_ptr, rpathname->rep) - U_INTERNAL_ASSERT(file_name) + U_INTERNAL_ASSERT(basename) U_INTERNAL_ASSERT_POINTER(file) U_INTERNAL_ASSERT_POINTER(pathname) U_INTERNAL_ASSERT_POINTER(cache_file) - - /* - if (pathname->equal(file_ptr, file_len) == false) - { - U_DEBUG("UHTTP::manageDataForCache(%V) pathname(%u) = %V file(%u) = %.*S", file_name.rep, pathname->size(), pathname->rep, file_len, file_len, file_ptr) - } - */ + U_ASSERT_EQUALS(suffix, file->getSuffix()) + U_ASSERT(pathname->equal(file_ptr, file_len)) U_NEW(UHTTP::UFileCacheData, file_data, UHTTP::UFileCacheData); @@ -8131,8 +8135,7 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) } #endif - suffix_len = (suffix = file->getSuffix()).size(); - suffix_ptr = (suffix_len ? suffix.data() : U_NULLPTR); + suffix_ptr = ((suffix_len = suffix.size()) ? suffix.data() : U_NULLPTR); if (u_dosmatch(file_ptr, file_len, U_CONSTANT_TO_PARAM("*cgi-bin/*"), 0)) { @@ -8197,60 +8200,60 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) goto error; } + basename_len = basename.size(); + basename_ptr = basename.data(); + if (suffix_len) { // manage authorization data... if (suffix_len == 8) { - if (u_get_unalignedp64(suffix_ptr) == U_MULTICHAR_CONSTANT64('h','t','p','a','s','s','w','d')) + if (u_get_unalignedp64(suffix_ptr) == U_MULTICHAR_CONSTANT64('h','t','p','a','s','s','w','d') || + u_get_unalignedp64(suffix_ptr) == U_MULTICHAR_CONSTANT64('h','t','d','i','g','e','s','t')) { + if (u_get_unalignedp16(file_ptr) != U_MULTICHAR_CONSTANT16('.','.')) + { + U_WARNING("Find file data users permission (%V - %u bytes) inside DOCUMENT_ROOT (%w), for security reason it must be moved into the directory up", + pathname->rep, file_data->size); + + goto error; + } + UString content = file->getContent(true, false, true); - if (u_get_unalignedp32(file_ptr) == U_MULTICHAR_CONSTANT32('.','.','/','.')) + if (u_get_unalignedp16(file_ptr+2) != U_MULTICHAR_CONSTANT16('/','.')) + { + U_NEW(UVector, file_data->array, UVector(1U)); + + file_data->array->push_back(content); + + U_SRV_LOG("File data users permission: %V loaded - %u bytes", pathname->rep, file_data->size); + + goto end; + } + + U_INTERNAL_ASSERT_EQUALS(file_len, 12) + + if (u_get_unalignedp64(suffix_ptr) == U_MULTICHAR_CONSTANT64('h','t','p','a','s','s','w','d')) { - U_INTERNAL_ASSERT_EQUALS(file_len, 12) U_INTERNAL_ASSERT_EQUALS(htpasswd, U_NULLPTR) U_NEW(UString, htpasswd, UString(content)); - U_SRV_LOG("File data users permission: ../.htpasswd loaded - %u bytes", file_data->size); - - goto error; + U_SRV_LOG("File data users permission: %V loaded - %u bytes", pathname->rep, file_data->size); } - - U_NEW(UVector, file_data->array, UVector(1U)); - - file_data->array->push_back(content); - - U_SRV_LOG("File data users permission: %V loaded - %u bytes", pathname->rep, file_data->size); - - goto end; - } - - if (u_get_unalignedp64(suffix_ptr) == U_MULTICHAR_CONSTANT64('h','t','d','i','g','e','s','t')) - { - UString content = file->getContent(true, false, true); - - if (u_get_unalignedp32(file_ptr) == U_MULTICHAR_CONSTANT32('.','.','/','.')) + else { - U_INTERNAL_ASSERT_EQUALS(file_len, 12) U_INTERNAL_ASSERT_EQUALS(htdigest, U_NULLPTR) + U_INTERNAL_ASSERT_EQUALS(u_get_unalignedp64(suffix_ptr), U_MULTICHAR_CONSTANT64('h','t','d','i','g','e','s','t')) U_NEW(UString, htdigest, UString(content)); U_SRV_LOG("File data users permission: ../.htdigest loaded - %u bytes", file_data->size); - - goto error; } - U_NEW(UVector, file_data->array, UVector(1U)); - - file_data->array->push_back(content); - - U_SRV_LOG("File data users permission: %V loaded - %u bytes", pathname->rep, file_data->size); - - goto end; + goto error; } goto check; @@ -8258,10 +8261,10 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) // manage gzip bomb... - if (suffix_len == 2 && - UServer_Base::bssl != false && // NB: we can't use sendfile with SSL... - u_get_unalignedp16( suffix_ptr) == U_MULTICHAR_CONSTANT16('g','z') && - u_get_unalignedp64(file_name_ptr) == U_MULTICHAR_CONSTANT64('_','_','B','o','m','B','_','_')) + if (suffix_len == 2 && + UServer_Base::bssl != false && // NB: we can't use sendfile with SSL... + u_get_unalignedp16( suffix_ptr) == U_MULTICHAR_CONSTANT16('g','z') && + u_get_unalignedp64(basename_ptr) == U_MULTICHAR_CONSTANT64('_','_','B','o','m','B','_','_')) { U_INTERNAL_ASSERT_EQUALS(file_gzip_bomb, U_NULLPTR) @@ -8290,8 +8293,8 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) // NB: when a pathfile ends with "*.[so|usp|c|dll]" it is assumed to be a dynamic page... - if (UServices::dosMatch( file_name_ptr, file_name_len, U_CONSTANT_TO_PARAM("*.0.so"), 0) == false && // MACOSX - UServices::dosMatchWithOR(file_name_ptr, file_name_len, U_CONSTANT_TO_PARAM("*.so|*.usp|*.c|*.dll"), 0)) + if (UServices::dosMatch( basename_ptr, basename_len, U_CONSTANT_TO_PARAM("*.0.so"), 0) == false && // MACOSX + UServices::dosMatchWithOR(basename_ptr, basename_len, U_CONSTANT_TO_PARAM("*.so|*.usp|*.c|*.dll"), 0)) { bool usp_dll = false, usp_src = (suffix_len == 3 && @@ -8307,6 +8310,8 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) { (void) pathname->shrink(); + U_ASSERT_EQUALS(cache_file->find(*pathname), false) + cache_file->insert(*pathname, file_data); U_NEW(UHTTP::UFileCacheData, file_data, UHTTP::UFileCacheData); @@ -8317,8 +8322,8 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) file_data->mime_index = U_usp; } - uint32_t len = file_len -suffix_len-1, // NB: we must avoid the point '.' before the suffix... - name_len = file_name_len-suffix_len-1; + uint32_t len = file_len -suffix_len-1, // NB: we must avoid the point '.' before the suffix... + name_len = basename_len-suffix_len-1; U_INTERNAL_ASSERT_MAJOR(len, 0) U_INTERNAL_ASSERT_MAJOR(name_len, 0) @@ -8328,7 +8333,7 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) struct stat st; char buffer[U_PATH_MAX]; - UServletPage* usp = getUSP(file_name_ptr, name_len); + UServletPage* usp = getUSP(basename_ptr, name_len); if (usp) { @@ -8338,7 +8343,7 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) file_data->ptr = usp; file_data->link = true; - U_SRV_LOG("USP found: %.*S (link), USP service registered (URI): %V", file_name_len, file_name_ptr, pathname->rep); + U_SRV_LOG("USP found: %V (link), USP service registered (URI): %V", basename.rep, pathname->rep); goto end; } @@ -8358,14 +8363,14 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) if (usp == U_NULLPTR) { - U_NEW(UHTTP::UServletPage, usp, UHTTP::UServletPage(file_ptr, len, file_name_ptr, name_len)); + U_NEW(UHTTP::UServletPage, usp, UHTTP::UServletPage(file_ptr, len, basename_ptr, name_len)); } if (usp->load() == false) goto error; file_data->ptr = usp; - U_SRV_LOG("USP found: %.*S, USP service registered (URI): %V", file_name_len, file_name_ptr, pathname->rep); + U_SRV_LOG("USP found: %V, USP service registered (URI): %V", basename.rep, pathname->rep); } # ifdef HAVE_LIBTCC else if (suffix_len == 1 && @@ -8394,7 +8399,7 @@ U_NO_EXPORT void UHTTP::manageDataForCache(const UString& file_name) (void) pathname->replace(file_ptr, file_len - U_CONSTANT_SIZE(".c")); - U_SRV_LOG("CSP found: %.*S, CSP service registered (URI): %V", file_name_len, file_name_ptr, pathname->rep); + U_SRV_LOG("CSP found: %V, CSP service registered (URI): %V", basename.rep, pathname->rep); } # endif @@ -8423,7 +8428,7 @@ check: } if (cache_file_mask && - UServices::dosMatchWithOR(file_name_ptr, file_name_len, U_STRING_TO_PARAM(*cache_file_mask), 0)) + UServices::dosMatchWithOR(basename_ptr, basename_len, U_STRING_TO_PARAM(*cache_file_mask), 0)) { ctype = setMimeIndex(suffix_ptr); @@ -8460,6 +8465,8 @@ end: (void) pathname->shrink(); + U_ASSERT_EQUALS(cache_file->find(*pathname), false) + cache_file->insert(*pathname, file_data); // NB: we don't need to call u_construct()... return; @@ -8769,16 +8776,18 @@ nocontent: UClientImage_Base::setCloseConnection(); if (file->stat()) # endif { - uri_suffix = u_getsuffix(U_STRING_TO_PARAM(basename)); + UString suffix; - if (uri_suffix) + ptr = u_getsuffix(U_STRING_TO_PARAM(basename)); + + if (ptr) { - uint32_t n = u__strlen(++uri_suffix, __PRETTY_FUNCTION__); + len = u__strlen(++ptr, __PRETTY_FUNCTION__); - if (U_STREQ(uri_suffix, n, U_LIB_SUFFIX)) goto nocontent; + if (U_STREQ(ptr, len, U_LIB_SUFFIX)) goto nocontent; if (U_HTTP_QUERY_STREQ("_nav_") && - U_STREQ(uri_suffix, n, "usp")) + U_STREQ(ptr, len, "usp")) { UClientImage_Base::setRequestNeedProcessing(); } @@ -8792,7 +8801,11 @@ nocontent: UClientImage_Base::setCloseConnection(); U_ASSERT_EQUALS(basename, UStringExt::basename(file->getPath())) - manageDataForCache(basename); + if (len) (void) suffix.assign(ptr, len); + + (void) pathname->replace(U_FILE_TO_PARAM(*file)); + + manageDataForCache(basename, suffix); U_INTERNAL_ASSERT_POINTER(file_data) } @@ -11006,6 +11019,80 @@ found: U_RETURN_POINTER(usp, UHTTP::UServletPage); } +bool UHTTP::checkForUSP() +{ + U_TRACE_NO_PARAM(0, "UHTTP::checkForUSP()") + + unsigned char* ptr = (unsigned char*)UClientImage_Base::rbuffer->c_pointer(3); + + U_INTERNAL_DUMP("ptr = %.16S", ptr) + + if (u_get_unalignedp16(ptr) == U_MULTICHAR_CONSTANT16(' ','/')) + { + static uint32_t old_sz; + static UServletPage* old_usp; + + uint32_t sz; + UServletPage* usp; + unsigned char* ptr1 = (ptr += 2); + +loop: while (u__isalpha(*++ptr1)) {} + + if (*ptr1 == '_') goto loop; + + sz = ptr1-ptr; + + U_INTERNAL_DUMP("uri = %.*S", sz, ptr) + + if (sz == old_sz) + { + U_ASSERT(old_usp->basename.equal((const char*)ptr, sz)) + + usp = old_usp; + + goto next; + } + + if (u_get_unalignedp64(ptr) != U_MULTICHAR_CONSTANT64('p','l','a','i','n','t','e','x')) + { + usp = getUSP((const char*)ptr, sz); + + if (usp) + { + old_sz = sz; + old_usp = usp; + +next: if (*ptr1 == '?') + { + U_http_info.query = (const char*)(ptr1 += U_CONSTANT_SIZE("?queries")); + + while (*++ptr1 != ' ') {} + + U_http_info.query_len = (const char*)ptr1 - U_http_info.query; + + U_INTERNAL_DUMP("query = %.*S", U_HTTP_QUERY_TO_TRACE) + } + + U_http_content_type_len = 0; + + U_http_info.nResponseCode = HTTP_OK; + + usp->runDynamicPage(0); + + setDynamicResponse(); + + ext->clear(); + + (void) UServer_Base::pClientImage->writeResponse(); + + U_RETURN(true); + } + } + } + + U_RETURN(false); +} + void UHTTP::callInitForAllUSP() { U_TRACE_NO_PARAM(0+256, "UHTTP::callInitForAllUSP()") diff --git a/tests/base/test_sprintf.c b/tests/base/test_sprintf.c index 02f61311..bdcd85f4 100644 --- a/tests/base/test_sprintf.c +++ b/tests/base/test_sprintf.c @@ -183,9 +183,9 @@ static void test3(void) puts(""); } +/* static void test4(void) { -/* #if !defined(SOLARIS) && !defined(MACOSX) char bytes[7]; char buf[20]; @@ -206,8 +206,8 @@ static void test4(void) result = 1; } #endif -*/ } +*/ int main(int argc, char* argv[]) { @@ -319,7 +319,5 @@ int main(int argc, char* argv[]) rfg1(); rfg2(); - test4(); - return (result != 0); } diff --git a/tests/examples/FrameworkBenchmarks.sh b/tests/examples/FrameworkBenchmarks.sh index 02395010..a7bddf16 100755 --- a/tests/examples/FrameworkBenchmarks.sh +++ b/tests/examples/FrameworkBenchmarks.sh @@ -28,17 +28,17 @@ export ORM_DRIVER ORM_OPTION UMEMPOOL # ---------------------------------------------------------------------------------------------------------------------------------------------------------- #Running 15s test @ http://localhost:8080/plaintext # 4 threads and 256 connections -# Thread Stats Avg Stdev Max +/- Stdev -# Latency 1.00ms 220.28us 17.02ms 74.17% -# Req/Sec 552.46k 33.92k 614.40k 54.19% -# Latency Distribution -# 50% 1.00ms -# 75% 1.13ms -# 90% 1.24ms -# 99% 1.43ms -# 31102816 requests in 14.97s, 3.74GB read -#Requests/sec: 2077107.68 -#Transfer/sec: 255.53MB +# Thread Stats Avg Stdev Max +/- Stdev +# Latency 1.86ms 2.30ms 28.08ms 88.21% +# Req/Sec 552.42k 200.56k 1.39M 68.22% +# Latency Distribution +# 50% 1.00ms +# 75% 2.46ms +# 90% 4.53ms +# 99% 11.03ms +# 30638208 requests in 14.99s, 3.68GB read +#Requests/sec: 2044562.05 +#Transfer/sec: 251.53MB # ---------------------------------------------------------------------------------------------------------------------------------------------------------- # JSON # ---------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -49,16 +49,16 @@ export ORM_DRIVER ORM_OPTION UMEMPOOL #Running 15s test @ http://localhost:8080/json # 4 threads and 256 connections # Thread Stats Avg Stdev Max +/- Stdev -# Latency 449.69us 236.81us 20.50ms 89.87% -# Req/Sec 76.61k 5.88k 99.00k 54.11% +# Latency 0.90ms 2.52ms 36.05ms 93.49% +# Req/Sec 89.35k 47.88k 229.78k 65.55% # Latency Distribution -# 50% 443.00us -# 75% 562.00us -# 90% 645.00us -# 99% 823.00us -# 4323309 requests in 15.00s, 614.33MB read -#Requests/sec: 288235.65 -#Transfer/sec: 40.96MB +# 50% 166.00us +# 75% 408.00us +# 90% 2.27ms +# 99% 11.68ms +# 4845404 requests in 15.00s, 688.52MB read +#Requests/sec: 323059.07 +#Transfer/sec: 45.91MB # ---------------------------------------------------------------------------------------------------------------------------------------------------------- # DB # ---------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/tests/examples/ok/web_server_ssl.ok b/tests/examples/ok/web_server_ssl.ok index d7e2b3fb..debdf170 100644 --- a/tests/examples/ok/web_server_ssl.ok +++ b/tests/examples/ok/web_server_ssl.ok @@ -1,11 +1,11 @@ HTTP/1.1 505 HTTP Version Not Supported -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Length: 0 HTTP/1.1 501 Not Implemented -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -21,7 +21,7 @@ Content-Length: 256
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -37,7 +37,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -53,7 +53,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -69,19 +69,19 @@ Content-Length: 263
ULib Server
HTTP/1.1 411 Length Required -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Length: 0 HTTP/1.1 413 Request Entity Too Large -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Length: 0 HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -97,7 +97,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -113,7 +113,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -129,7 +129,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -145,7 +145,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -161,7 +161,7 @@ Content-Length: 263
ULib Server
HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -177,14 +177,14 @@ Content-Length: 263
ULib Server
HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT, COPY, MOVE, LOCK, UNLOCK, MKCOL, PROPFIND, PATCH, PURGE, MERGE, REPORT, CHECKOUT, MKACTIVITY, NOTIFY, MSEARCH, SUBSCRIBE, UNSUBSCRIBE Content-Length: 0 HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -200,13 +200,13 @@ Content-Length: 254
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 257 HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 344 @@ -221,7 +221,7 @@ Content-Length: 344
ULib Server
HTTP/1.1 403 Forbidden -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 304 @@ -236,7 +236,7 @@ Content-Length: 304
ULib Server
HTTP/1.1 500 Internal Server Error -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 548 @@ -251,14 +251,14 @@ Content-Length: 548
ULib Server
HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/plain; charset=UTF-8 Content-Length: 21 pippo pluto paperino HTTP/1.1 401 Authorization Required -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 WWW-Authenticate: Basic realm="Protected Area" @@ -274,20 +274,20 @@ Content-Length: 444
ULib Server
HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 -Expires: Mon, 27 Aug 2018 12:44:45 GMT +Expires: Sat, 01 Sep 2018 13:12:32 GMT Last-Modified: Fri, 20 Feb 2009 14:50:49 GMT Content-Length: 63 this is the web_server testsuite inp/http/data/index.html file HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Range: bytes 0-63/64 Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:46 GMT +Expires: Sat, 01 Sep 2018 13:12:33 GMT Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT Content-Length: 64 @@ -296,1971 +296,89 @@ Content-Length: 64 234567892345678 012345670123456 HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Range: bytes 0-31/64 Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:46 GMT +Expires: Sat, 01 Sep 2018 13:12:33 GMT Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT Content-Length: 32 123456781234567 345678903456789 HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Range: bytes 32-63/64 Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:46 GMT +Expires: Sat, 01 Sep 2018 13:12:33 GMT Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT Content-Length: 32 234567892345678 012345670123456 HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Range: bytes 32-63/64 Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:46 GMT +Expires: Sat, 01 Sep 2018 13:12:33 GMT Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT Content-Length: 32 234567892345678 012345670123456 HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 227 -Content-Type: multipart/byteranges; boundary="=_1873595992937126598" - - ---=_1873595992937126598 -Content-Range: bytes 0-0/64 -Content-Type: text/html; charset=UTF-8 - -1 ---=_1873595992937126598 -Content-Range: bytes 63-63/64 -Content-Type: text/html; charset=UTF-8 - - - ---=_1873595992937126598--HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Range: bytes 50-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:46 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 14 - -2345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 247 -Content-Type: multipart/byteranges; boundary="=_1873595992937126599" - - ---=_1873595992937126599 -Content-Range: bytes 10-19/64 -Content-Type: text/html; charset=UTF-8 - -34567 -3456 ---=_1873595992937126599 -Content-Range: bytes 50-59/64 -Content-Type: text/html; charset=UTF-8 - -2345670123 ---=_1873595992937126599--HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:46 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 64 - -123456781234567 -345678903456789 -234567892345678 -012345670123456 -HTTP/1.1 204 No Content -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 0 - -HTTP/1.1 204 No Content -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 0 - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Encoding: gzip -Content-Type: text/html; charset=UTF-8 -Last-Modified: Thu, 24 Aug 2017 17:24:24 GMT -Content-Length: 293 - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Last-Modified: Thu, 24 Aug 2017 17:24:24 GMT -Content-Length: 562 - -Index of tmp

Index of directory: tmp


Up one level
c 4 Bytes27/08/2017 12:44:45

ULib Server
HTTP/1.1 304 Not Modified -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 0 - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 1669 - - - - Welcome to ULib Web Server! - - - - -
-

Welcome to ULib Web Server!

-
- - -
- - - - - - -
- - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 2187 - -
-ssi_begin
-This page last updated: Friday, 30-Oct-2015 15:20:57 GMT
-
- -1: ok - - -2: ok - - -3: ok - - -4: ok - - -
-SSI_BEGIN
-Name of user: nobody
-
-Document name: ssi1.shtml
-
-Document URI: /SSI/ssi1.shtml
-
-It's now: Sunday, 27-Aug-2017 12:44:46 GMT
-
-It's now: Sunday, 27-Aug-2017 14:44:46 CEST
-
-This page is:     179 Bytes
-
-This file last modified: August 12, 2015
-
-You're using: 
-
-$HTTP_X_SENDFILE: 
-
-
-start PRINTENV
---------------
-QUERY_STRING=
-REQUEST_URI=/SSI/ssi1.shtml
-CONTENT_LENGTH=0
-REQUEST_METHOD=GET
-SCRIPT_NAME=/SSI/ssi1.shtml
-SERVER_NAME=stefano
-SERVER_PORT=4443
-HTTP_HOST=10.30.1.131
-HTTPS=on
-'SSL_CLIENT_I_DN=/C=IT/ST=Italy/L=Sesto Fiorentino/O=Unirel spa/OU=CA/CN=localhost.localdomain/emailAddress=root@localhost.localdomain'
-'SSL_CLIENT_S_DN=/C=IT/ST=Italy/O=Unirel spa/OU=username/CN=localhost.localdomain/emailAddress=root@localhost.localdomain'
-SSL_CLIENT_CERT_SERIAL=2
-SERVER_PROTOCOL=HTTP/1.1
-SERVER_ADDR=127.0.0.1
-DOCUMENT_ROOT=/usr/src/ULib-1.4.2/tests/examples/docroot
-SERVER_SOFTWARE=ULib/1.4.2
-REMOTE_PORT=33216
-REMOTE_ADDR=127.0.0.1
-SESSION_ID=127.0.0.1:0
-REQUEST_ID=127.0.0.1:33216:0
-PWD=/usr/src/ULib-1.4.2/tests/examples/docroot
-PATH=/usr/local/bin:/usr/bin:/bin
-HTTP_X_SENDFILE=puppamelo
---------------
-end   PRINTENV
- 
-
-start LS
---------------
-total 392
-drwxr-xr-x 3 nobody nobody   4096 Oct 30  2015 .
-drwxr-xr-x 8 nobody nobody 368640 Aug 27 14:44 ..
-drwxr-xr-x 3 nobody nobody   4096 Aug 25  2014 earth
--rw-r--r-- 1 nobody nobody    179 Aug 12  2015 embed.c
--rw-r--r-- 3 nobody nobody    160 Mar 28  2011 index.shtml
--rw-r--r-- 1 nobody nobody    352 Nov  8  2011 menu.shtml
--rw-r--r-- 1 nobody nobody    917 Oct 30  2015 ssi1.shtml
--rw-r--r-- 1 nobody nobody   1190 Aug 25  2014 ssi2.shtml
---------------
-end   LS
-
-start CGI
---------------
-Content-Type: text/html
-
-You're not using Microsoft® Internet Explorer® 5.0
---------------
-end   CGI
-SSI include failed!
-SSI include failed!
-/*int main(void) {
-  struct mg_context* ctx;
-  const char *options[] = {"listening_ports", LISTENING_PORT, NULL};
-
-  ctx = mg_start(callback, options);
-  pause();
-  return 0;
-}*/
-
-SSI_END
-
- - -
-ssi_end
-
-HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 115 -X-Real-IP: 10.30.1.131 -Set-Cookie: ulib.s1=; expires=Sat, 26 Aug 2017 12:44:46 GMT -Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303339323432383626cf0c4ab2fa690932cabb4e640286c67c; expires=Mon, 28 Aug 2017 12:44:46 GMT -Set-Cookie: TestCookie=pippo -Content-Type: text/html; charset=iso-8859-1 - -UID = Steve Johnson -HTTP_COOKIE = name1=value1, name2=value2; name3=value3, name4=value4 -ULIB_SESSION = -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Encoding: gzip -Content-Type: text/html; charset=UTF-8 -Content-Length: 718 - -UQO0~8Im%40^Si  \''m;'iڲD%*cw\L,EJpJ j}'cxhXBl2RYXP<_V|5o7=(2XlUr΂v5 Iy:J27tU.h /=.`Br!w t6+٧ 9דHQ<|OEZ n[:i |O{DH[z3c5?_L&LVibl!&&֩H֐)+.C дް4|tb]PS]Xhonyb)'̃F;2N"JSZʼnɼ,䴎2yB" ,L.uJ3&PdKuӹI“`YɿGQe\ז!9*NIvekRNIVHw9YuP>̎:vtzWf"X R?IRc:LmUEcO>?tt=OuBaiS-ELi..ek=wjm1 p_N/CrBէùVJ -B>prYI𾧫svNIIKltw?mMc{ *HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 211 -Content-Type: text/html - -

Esempio di CGI

scritto in linguaggio rubyHTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Length: 72 -Content-Type: application/jsonrequest - -{"user":"doctoravatar@penzance.com","t":"vlIj","forecast":7,"zip":94089}HTTP/1.1 302 Moved Temporarily -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Location: http://10.30.1.131/?ticket=U2FsdGVkX1+/AYaicDGB1EReb1+EErzD/ar1Wrv8wrXpYEj9RoN3RlzFWK5ykUyRMg4AicmBMNQsUQDWZENgiQ -X-Powered-By: PHP/5.2.6-pl7-gentoo -X-Powered-By: PHP/5.2.6-pl7-gentoo -Content-Length: 365 - - - -302 Moved Temporarily - -

Moved Temporarily

-

The document has moved here

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test" was not found on this server

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: image/x-icon -Expires: Mon, 27 Aug 2018 12:44:45 GMT -Last-Modified: Fri, 24 Jul 2009 16:01:29 GMT -Content-Length: 318 - -(( Fi " " " " " 33333HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 253 - - - -404 Not Found - -

Not Found

-

Your requested URL "/dumbfuck" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 273 - - - -404 Not Found - -

Not Found

-

Your requested URL "/get_no_headers_no_body/world" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 267 - - - -404 Not Found - -

Not Found

-

Your requested URL "/get_one_header_no_body" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 280 - - - -404 Not Found - -

Not Found

-

Your requested URL "/get_funky_content_length_body_hello" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 269 - - - -404 Not Found - -

Not Found

-

Your requested URL "/post_identity_body_world" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 271 - - - -404 Not Found - -

Not Found

-

Your requested URL "/post_chunked_all_your_base" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 269 - - - -404 Not Found - -

Not Found

-

Your requested URL "/two_chunks_mult_zero_end" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 271 - - - -404 Not Found - -

Not Found

-

Your requested URL "/chunked_w_trailing_headers" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 276 - - - -404 Not Found - -

Not Found

-

Your requested URL "/chunked_w_bullshit_after_length" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 253 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test.cgi" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test" was not found on this server

-
-
ULib Server
- -HTTP/1.1 101 Switching Protocols -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= - -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/demo" was not found on this server

-
-
ULib Server
- -HTTP/1.1 403 Forbidden -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 248 - - - -403 Forbidden - -

Forbidden

-

You don't have permission to access "*" on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 254 - - - -404 Not Found - -

Not Found

-

Your requested URL "/index.php" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:46 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 253 - - - -404 Not Found - -

Not Found

-

Your requested URL "/file.txt" was not found on this server

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:51 GMT -Server: ULib -Connection: close -Set-Cookie: ulib.s0=5374657665204a6f686e736f6e26313530333932343239312625211e6e2dfabfc40e805a667f915d9f; expires=Mon, 28 Aug 2017 12:44:51 GMT -Content-Length: 0 - - - - - - - - - - - - - -
Your file have been uploaded!

- File #1: /uploads/vuoto.txt
-
-
- Go Back
- - - - - - - - - - - - - - -
Your file have been uploaded!

- File #1: /uploads/operazione.xml
-
-
- Go Back
- - -HTTP/1.1 505 HTTP Version Not Supported -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Length: 0 - -HTTP/1.1 501 Not Implemented -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 256 - - - -501 Not Implemented - -

Not Implemented

-

Sorry, the method you requested is not implemented

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 411 Length Required -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Length: 0 - -HTTP/1.1 413 Request Entity Too Large -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Length: 0 - -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT, COPY, MOVE, LOCK, UNLOCK, MKCOL, PROPFIND, PATCH, PURGE, MERGE, REPORT, CHECKOUT, MKACTIVITY, NOTIFY, MSEARCH, SUBSCRIBE, UNSUBSCRIBE -Content-Length: 0 - -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 254 - - - -404 Not Found - -

Not Found

-

Your requested URL "/index.php" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 257 - -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 344 - - - -404 Not Found - -

Not Found

-

Your requested URL "/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" was not found on this server

-
-
ULib Server
- -HTTP/1.1 403 Forbidden -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 304 - - - -403 Forbidden - -

Forbidden

-

You don't have permission to access "/../../../../linux/include/generated/uapi/linux/version.h" on this server

-
-
ULib Server
- -HTTP/1.1 500 Internal Server Error -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 548 - - - -500 Internal Server Error - -

Internal Server Error

-

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/plain; charset=UTF-8 -Content-Length: 21 - -pippo pluto paperino -HTTP/1.1 401 Authorization Required -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -WWW-Authenticate: Basic realm="Protected Area" -Content-Length: 444 - - - -401 Authorization Required - -

Authorization Required

-

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Expires: Mon, 27 Aug 2018 12:44:54 GMT -Last-Modified: Fri, 20 Feb 2009 14:50:49 GMT -Content-Length: 63 - -this is the web_server testsuite inp/http/data/index.html file -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Range: bytes 0-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:55 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 64 - -123456781234567 -345678903456789 -234567892345678 -012345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Range: bytes 0-31/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:55 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 32 - -123456781234567 -345678903456789 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Range: bytes 32-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:55 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 32 - -234567892345678 -012345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Range: bytes 32-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:55 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 32 - -234567892345678 -012345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 227 -Content-Type: multipart/byteranges; boundary="=_9223470582057439802" - - ---=_9223470582057439802 -Content-Range: bytes 0-0/64 -Content-Type: text/html; charset=UTF-8 - -1 ---=_9223470582057439802 -Content-Range: bytes 63-63/64 -Content-Type: text/html; charset=UTF-8 - - - ---=_9223470582057439802--HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Range: bytes 50-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:55 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 14 - -2345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 247 -Content-Type: multipart/byteranges; boundary="=_9223470582057439803" - - ---=_9223470582057439803 -Content-Range: bytes 10-19/64 -Content-Type: text/html; charset=UTF-8 - -34567 -3456 ---=_9223470582057439803 -Content-Range: bytes 50-59/64 -Content-Type: text/html; charset=UTF-8 - -2345670123 ---=_9223470582057439803--HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:44:55 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 64 - -123456781234567 -345678903456789 -234567892345678 -012345670123456 -HTTP/1.1 204 No Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 0 - -HTTP/1.1 204 No Content -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 0 - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Encoding: gzip -Content-Type: text/html; charset=UTF-8 -Last-Modified: Thu, 24 Aug 2017 17:24:24 GMT -Content-Length: 293 - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Last-Modified: Thu, 24 Aug 2017 17:24:24 GMT -Content-Length: 562 - -Index of tmp

Index of directory: tmp


Up one level
c 4 Bytes27/08/2017 12:44:45

ULib Server
HTTP/1.1 304 Not Modified -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 0 - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 1669 - - - - Welcome to ULib Web Server! - - - - -
-

Welcome to ULib Web Server!

-
- - -
- - - - - - -
- - -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 2187 - -
-ssi_begin
-This page last updated: Friday, 30-Oct-2015 15:20:57 GMT
-
- -1: ok - - -2: ok - - -3: ok - - -4: ok - - -
-SSI_BEGIN
-Name of user: nobody
-
-Document name: ssi1.shtml
-
-Document URI: /SSI/ssi1.shtml
-
-It's now: Sunday, 27-Aug-2017 12:44:55 GMT
-
-It's now: Sunday, 27-Aug-2017 14:44:55 CEST
-
-This page is:     179 Bytes
-
-This file last modified: August 12, 2015
-
-You're using: 
-
-$HTTP_X_SENDFILE: 
-
-
-start PRINTENV
---------------
-QUERY_STRING=
-REQUEST_URI=/SSI/ssi1.shtml
-CONTENT_LENGTH=0
-REQUEST_METHOD=GET
-SCRIPT_NAME=/SSI/ssi1.shtml
-SERVER_NAME=stefano
-SERVER_PORT=4443
-HTTP_HOST=10.30.1.131
-HTTPS=on
-'SSL_CLIENT_I_DN=/C=IT/ST=Italy/L=Sesto Fiorentino/O=Unirel spa/OU=CA/CN=localhost.localdomain/emailAddress=root@localhost.localdomain'
-'SSL_CLIENT_S_DN=/C=IT/ST=Italy/O=Unirel spa/OU=username/CN=localhost.localdomain/emailAddress=root@localhost.localdomain'
-SSL_CLIENT_CERT_SERIAL=2
-SERVER_PROTOCOL=HTTP/1.1
-SERVER_ADDR=127.0.0.1
-DOCUMENT_ROOT=/usr/src/ULib-1.4.2/tests/examples/docroot
-SERVER_SOFTWARE=ULib/1.4.2
-REMOTE_PORT=33600
-REMOTE_ADDR=127.0.0.1
-SESSION_ID=127.0.0.1:0
-REQUEST_ID=127.0.0.1:33600:0
-PWD=/usr/src/ULib-1.4.2/tests/examples/docroot
-PATH=/usr/local/bin:/usr/bin:/bin
-HTTP_X_SENDFILE=puppamelo
---------------
-end   PRINTENV
- 
-
-start LS
---------------
-total 392
-drwxr-xr-x 3 nobody nobody   4096 Oct 30  2015 .
-drwxr-xr-x 8 nobody nobody 368640 Aug 27 14:44 ..
-drwxr-xr-x 3 nobody nobody   4096 Aug 25  2014 earth
--rw-r--r-- 1 nobody nobody    179 Aug 12  2015 embed.c
--rw-r--r-- 3 nobody nobody    160 Mar 28  2011 index.shtml
--rw-r--r-- 1 nobody nobody    352 Nov  8  2011 menu.shtml
--rw-r--r-- 1 nobody nobody    917 Oct 30  2015 ssi1.shtml
--rw-r--r-- 1 nobody nobody   1190 Aug 25  2014 ssi2.shtml
---------------
-end   LS
-
-start CGI
---------------
-Content-Type: text/html
-
-You're not using Microsoft® Internet Explorer® 5.0
---------------
-end   CGI
-SSI include failed!
-SSI include failed!
-/*int main(void) {
-  struct mg_context* ctx;
-  const char *options[] = {"listening_ports", LISTENING_PORT, NULL};
-
-  ctx = mg_start(callback, options);
-  pause();
-  return 0;
-}*/
-
-SSI_END
-
- - -
-ssi_end
-
-HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 115 -X-Real-IP: 10.30.1.131 -Set-Cookie: ulib.s1=; expires=Sat, 26 Aug 2017 12:44:55 GMT -Set-Cookie: ulib.s0=5374657665204a6f686e736f6e2631353033393234323935262c8f4797fc615e0a123ce72eb796a36d; expires=Mon, 28 Aug 2017 12:44:55 GMT -Set-Cookie: TestCookie=pippo -Content-Type: text/html; charset=iso-8859-1 - -UID = Steve Johnson -HTTP_COOKIE = name1=value1, name2=value2; name3=value3, name4=value4 -ULIB_SESSION = -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Encoding: gzip -Content-Type: text/html; charset=UTF-8 -Content-Length: 718 - -UQO0~8Im%40^Si  \''m;'iڲD%*cw\L,EJpJ j}'cxhXBl2RYXP<_V|5o7=(2XlUr΂v5 Iy:J27tU.h /=.`Br!w t6+٧ 9דHQ<|OEZ n[:i |O{DH[z3c5?_L&LVibl!&&֩H֐)+.C дް4|tb]PS]Xhonyb)'̃F;2N"JSZʼnɼ,䴎2yB" ,L.uJ3&PdKuӹI“`YɿGQe\ז!9*NIvekRNIVHw9YuP>̎:vtzWf"X R?IRc:LmUEcO>?tt=OuBaiS-ELi..ek=wjm1 p_N/CrBէùVJ -B>prYI𾧫svNIIKltw?mMc{ *HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 211 -Content-Type: text/html - -

Esempio di CGI

scritto in linguaggio rubyHTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Length: 72 -Content-Type: application/jsonrequest - -{"user":"doctoravatar@penzance.com","t":"vlIj","forecast":7,"zip":94089}HTTP/1.1 302 Moved Temporarily -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Location: http://10.30.1.131/?ticket=U2FsdGVkX1+/AYaicDGB1EReb1+EErzD/ar1Wrv8wrXpYEj9RoN3RlzFWK5ykUyRMg4AicmBMNQsUQDWZENgiQ -X-Powered-By: PHP/5.2.6-pl7-gentoo -X-Powered-By: PHP/5.2.6-pl7-gentoo -Content-Length: 365 - - - -302 Moved Temporarily - -

Moved Temporarily

-

The document has moved here

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test" was not found on this server

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: image/x-icon -Expires: Mon, 27 Aug 2018 12:44:54 GMT -Last-Modified: Fri, 24 Jul 2009 16:01:29 GMT -Content-Length: 318 - -(( Fi " " " " " 33333HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 253 - - - -404 Not Found - -

Not Found

-

Your requested URL "/dumbfuck" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 273 - - - -404 Not Found - -

Not Found

-

Your requested URL "/get_no_headers_no_body/world" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 267 - - - -404 Not Found - -

Not Found

-

Your requested URL "/get_one_header_no_body" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 280 - - - -404 Not Found - -

Not Found

-

Your requested URL "/get_funky_content_length_body_hello" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 269 - - - -404 Not Found - -

Not Found

-

Your requested URL "/post_identity_body_world" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 271 - - - -404 Not Found - -

Not Found

-

Your requested URL "/post_chunked_all_your_base" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 269 - - - -404 Not Found - -

Not Found

-

Your requested URL "/two_chunks_mult_zero_end" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 271 - - - -404 Not Found - -

Not Found

-

Your requested URL "/chunked_w_trailing_headers" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 276 - - - -404 Not Found - -

Not Found

-

Your requested URL "/chunked_w_bullshit_after_length" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 253 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test.cgi" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/test" was not found on this server

-
-
ULib Server
- -HTTP/1.1 101 Switching Protocols -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= - -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 249 - - - -404 Not Found - -

Not Found

-

Your requested URL "/demo" was not found on this server

-
-
ULib Server
- -HTTP/1.1 403 Forbidden -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 248 - - - -403 Forbidden - -

Forbidden

-

You don't have permission to access "*" on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 254 - - - -404 Not Found - -

Not Found

-

Your requested URL "/index.php" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:44:55 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 253 - - - -404 Not Found - -

Not Found

-

Your requested URL "/file.txt" was not found on this server

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:00 GMT -Server: ULib -Connection: close -Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303339323433303026b0197adbd77032e40228db971f2a6ded; expires=Mon, 28 Aug 2017 12:45:00 GMT -Content-Length: 0 - - - - - - - - - - - - - -
Your file have been uploaded!

- File #1: /uploads/vuoto.txt
-
-
- Go Back
- - - - - - - - - - - - - - -
Your file have been uploaded!

- File #1: /uploads/operazione.xml
-
-
- Go Back
- - -HTTP/1.1 505 HTTP Version Not Supported -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Length: 0 - -HTTP/1.1 501 Not Implemented -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 256 - - - -501 Not Implemented - -

Not Implemented

-

Sorry, the method you requested is not implemented

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 411 Length Required -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Length: 0 - -HTTP/1.1 413 Request Entity Too Large -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Length: 0 - -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 400 Bad Request -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 263 - - - -400 Bad Request - -

Bad Request

-

Your browser sent a request that this server could not understand

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT, COPY, MOVE, LOCK, UNLOCK, MKCOL, PROPFIND, PATCH, PURGE, MERGE, REPORT, CHECKOUT, MKACTIVITY, NOTIFY, MSEARCH, SUBSCRIBE, UNSUBSCRIBE -Content-Length: 0 - -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Connection: close -Content-Type: text/html; charset=UTF-8 -Content-Length: 254 - - - -404 Not Found - -

Not Found

-

Your requested URL "/index.php" was not found on this server

-
-
ULib Server
- -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 257 - -HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 344 - - - -404 Not Found - -

Not Found

-

Your requested URL "/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" was not found on this server

-
-
ULib Server
- -HTTP/1.1 403 Forbidden -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 304 - - - -403 Forbidden - -

Forbidden

-

You don't have permission to access "/../../../../linux/include/generated/uapi/linux/version.h" on this server

-
-
ULib Server
- -HTTP/1.1 500 Internal Server Error -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Content-Length: 548 - - - -500 Internal Server Error - -

Internal Server Error

-

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/plain; charset=UTF-8 -Content-Length: 21 - -pippo pluto paperino -HTTP/1.1 401 Authorization Required -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -WWW-Authenticate: Basic realm="Protected Area" -Content-Length: 444 - - - -401 Authorization Required - -

Authorization Required

-

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required

-
-
ULib Server
- -HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Type: text/html; charset=UTF-8 -Expires: Mon, 27 Aug 2018 12:45:02 GMT -Last-Modified: Fri, 20 Feb 2009 14:50:49 GMT -Content-Length: 63 - -this is the web_server testsuite inp/http/data/index.html file -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Range: bytes 0-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:45:03 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 64 - -123456781234567 -345678903456789 -234567892345678 -012345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Range: bytes 0-31/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:45:03 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 32 - -123456781234567 -345678903456789 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Range: bytes 32-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:45:03 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 32 - -234567892345678 -012345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT -Server: ULib -Content-Range: bytes 32-63/64 -Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:45:03 GMT -Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT -Content-Length: 32 - -234567892345678 -012345670123456 -HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Length: 230 -Content-Type: multipart/byteranges; boundary="=_16573345174206815872" +Content-Type: multipart/byteranges; boundary="=_16501287578601884904" ---=_16573345174206815872 +--=_16501287578601884904 Content-Range: bytes 0-0/64 Content-Type: text/html; charset=UTF-8 1 ---=_16573345174206815872 +--=_16501287578601884904 Content-Range: bytes 63-63/64 Content-Type: text/html; charset=UTF-8 ---=_16573345174206815872--HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT +--=_16501287578601884904--HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Range: bytes 50-63/64 Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:45:03 GMT +Expires: Sat, 01 Sep 2018 13:12:33 GMT Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT Content-Length: 14 2345670123456 HTTP/1.1 206 Partial Content -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Length: 250 -Content-Type: multipart/byteranges; boundary="=_16573345174206815873" +Content-Type: multipart/byteranges; boundary="=_16501287578601884905" ---=_16573345174206815873 +--=_16501287578601884905 Content-Range: bytes 10-19/64 Content-Type: text/html; charset=UTF-8 34567 3456 ---=_16573345174206815873 +--=_16501287578601884905 Content-Range: bytes 50-59/64 Content-Type: text/html; charset=UTF-8 2345670123 ---=_16573345174206815873--HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +--=_16501287578601884905--HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/plain; charset=us-ascii -Expires: Mon, 27 Aug 2018 12:45:03 GMT +Expires: Sat, 01 Sep 2018 13:12:33 GMT Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT Content-Length: 64 @@ -2269,37 +387,37 @@ Content-Length: 64 234567892345678 012345670123456 HTTP/1.1 204 No Content -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Length: 0 HTTP/1.1 204 No Content -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Length: 0 HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Encoding: gzip Content-Type: text/html; charset=UTF-8 -Last-Modified: Thu, 24 Aug 2017 17:24:24 GMT +Last-Modified: Wed, 30 Aug 2017 15:16:34 GMT Content-Length: 293 HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 -Last-Modified: Thu, 24 Aug 2017 17:24:24 GMT +Last-Modified: Wed, 30 Aug 2017 15:16:34 GMT Content-Length: 562 -Index of tmp

Index of directory: tmp


Up one level
c 4 Bytes27/08/2017 12:44:45

ULib Server
HTTP/1.1 304 Not Modified -Date: Sun, 27 Aug 2017 12:45:03 GMT +Index of tmp

Index of directory: tmp


Up one level
c 4 Bytes01/09/2017 13:12:32

ULib Server
HTTP/1.1 304 Not Modified +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Length: 0 HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 1669 @@ -2346,10 +464,10 @@ Content-Length: 1669 HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Type: text/html; charset=UTF-8 -Content-Length: 2187 +Content-Length: 1908
 ssi_begin
@@ -2376,9 +494,9 @@ Document name: ssi1.shtml
 
 Document URI: /SSI/ssi1.shtml
 
-It's now: Sunday, 27-Aug-2017 12:45:03 GMT
+It's now: Friday, 01-Sep-2017 13:12:33 GMT
 
-It's now: Sunday, 27-Aug-2017 14:45:03 CEST
+It's now: Friday, 01-Sep-2017 15:12:33 CEST
 
 This page is:     179 Bytes
 
@@ -2400,17 +518,14 @@ SERVER_NAME=stefano
 SERVER_PORT=4443
 HTTP_HOST=10.30.1.131
 HTTPS=on
-'SSL_CLIENT_I_DN=/C=IT/ST=Italy/L=Sesto Fiorentino/O=Unirel spa/OU=CA/CN=localhost.localdomain/emailAddress=root@localhost.localdomain'
-'SSL_CLIENT_S_DN=/C=IT/ST=Italy/O=Unirel spa/OU=username/CN=localhost.localdomain/emailAddress=root@localhost.localdomain'
-SSL_CLIENT_CERT_SERIAL=2
 SERVER_PROTOCOL=HTTP/1.1
-SERVER_ADDR=127.0.0.1
+SERVER_ADDR=192.168.42.144
 DOCUMENT_ROOT=/usr/src/ULib-1.4.2/tests/examples/docroot
 SERVER_SOFTWARE=ULib/1.4.2
-REMOTE_PORT=34068
+REMOTE_PORT=50946
 REMOTE_ADDR=127.0.0.1
 SESSION_ID=127.0.0.1:0
-REQUEST_ID=127.0.0.1:34068:0
+REQUEST_ID=127.0.0.1:50946:0
 PWD=/usr/src/ULib-1.4.2/tests/examples/docroot
 PATH=/usr/local/bin:/usr/bin:/bin
 HTTP_X_SENDFILE=puppamelo
@@ -2422,7 +537,7 @@ start LS
 --------------
 total 392
 drwxr-xr-x 3 nobody nobody   4096 Oct 30  2015 .
-drwxr-xr-x 8 nobody nobody 368640 Aug 27 14:45 ..
+drwxr-xr-x 8 nobody nobody 368640 Sep  1 15:12 ..
 drwxr-xr-x 3 nobody nobody   4096 Aug 25  2014 earth
 -rw-r--r-- 1 nobody nobody    179 Aug 12  2015 embed.c
 -rw-r--r-- 3 nobody nobody    160 Mar 28  2011 index.shtml
@@ -2458,12 +573,12 @@ SSI_END
 ssi_end
 
HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Length: 115 X-Real-IP: 10.30.1.131 -Set-Cookie: ulib.s1=; expires=Sat, 26 Aug 2017 12:45:03 GMT -Set-Cookie: ulib.s0=5374657665204a6f686e736f6e2631353033393234333033266a88125b345f4e5dc6e84b192b047ad6; expires=Mon, 28 Aug 2017 12:45:03 GMT +Set-Cookie: ulib.s1=; expires=Thu, 31 Aug 2017 13:12:33 GMT +Set-Cookie: ulib.s0=5374657665204a6f686e736f6e26313530343335373935332629ffecb5acd9837ae8c0ae618322e069; expires=Sat, 02 Sep 2017 13:12:33 GMT Set-Cookie: TestCookie=pippo Content-Type: text/html; charset=iso-8859-1 @@ -2471,26 +586,26 @@ UID = Steve Johnson HTTP_COOKIE = name1=value1, name2=value2; name3=value3, name4=value4 ULIB_SESSION = HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:33 GMT Server: ULib Content-Encoding: gzip Content-Type: text/html; charset=UTF-8 Content-Length: 718 UQO0~8Im%40^Si  \''m;'iڲD%*cw\L,EJpJ j}'cxhXBl2RYXP<_V|5o7=(2XlUr΂v5 Iy:J27tU.h /=.`Br!w t6+٧ 9דHQ<|OEZ n[:i |O{DH[z3c5?_L&LVibl!&&֩H֐)+.C дް4|tb]PS]Xhonyb)'̃F;2N"JSZʼnɼ,䴎2yB" ,L.uJ3&PdKuӹI“`YɿGQe\ז!9*NIvekRNIVHw9YuP>̎:vtzWf"X R?IRc:LmUEcO>?tt=OuBaiS-ELi..ek=wjm1 p_N/CrBէùVJ -B>prYI𾧫svNIIKltw?mMc{ *HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Length: 211 Content-Type: text/html

Esempio di CGI

scritto in linguaggio rubyHTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Length: 72 Content-Type: application/jsonrequest {"user":"doctoravatar@penzance.com","t":"vlIj","forecast":7,"zip":94089}HTTP/1.1 302 Moved Temporarily -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Connection: close Content-Type: text/html; charset=UTF-8 @@ -2509,7 +624,7 @@ Content-Length: 365
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 249 @@ -2524,15 +639,15 @@ Content-Length: 249
ULib Server
HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: image/x-icon -Expires: Mon, 27 Aug 2018 12:45:02 GMT +Expires: Sat, 01 Sep 2018 13:12:32 GMT Last-Modified: Fri, 24 Jul 2009 16:01:29 GMT Content-Length: 318 (( Fi " " " " " 33333HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 253 @@ -2547,7 +662,7 @@ Content-Length: 253
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 273 @@ -2562,7 +677,7 @@ Content-Length: 273
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 267 @@ -2577,7 +692,7 @@ Content-Length: 267
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 280 @@ -2592,7 +707,7 @@ Content-Length: 280
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 269 @@ -2607,7 +722,7 @@ Content-Length: 269
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 271 @@ -2622,7 +737,7 @@ Content-Length: 271
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 269 @@ -2637,7 +752,7 @@ Content-Length: 269
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 271 @@ -2652,7 +767,7 @@ Content-Length: 271
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 276 @@ -2667,7 +782,7 @@ Content-Length: 276
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 249 @@ -2682,7 +797,7 @@ Content-Length: 249
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 253 @@ -2697,7 +812,7 @@ Content-Length: 253
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 249 @@ -2717,7 +832,7 @@ Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 249 @@ -2732,7 +847,7 @@ Content-Length: 249
ULib Server
HTTP/1.1 403 Forbidden -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 248 @@ -2747,7 +862,7 @@ Content-Length: 248
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 254 @@ -2762,7 +877,7 @@ Content-Length: 254
ULib Server
HTTP/1.1 404 Not Found -Date: Sun, 27 Aug 2017 12:45:03 GMT +Date: Fri, 01 Sep 2017 13:12:34 GMT Server: ULib Content-Type: text/html; charset=UTF-8 Content-Length: 253 @@ -2777,10 +892,1886 @@ Content-Length: 253
ULib Server
HTTP/1.1 200 OK -Date: Sun, 27 Aug 2017 12:45:08 GMT +Date: Fri, 01 Sep 2017 13:12:39 GMT Server: ULib Connection: close -Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303339323433303826a20004d1f85d8768b1f4ddf66d8542e1; expires=Mon, 28 Aug 2017 12:45:08 GMT +Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303433353739353926a7dbc19b7b5ebf8212a5ad578c6b226d; expires=Sat, 02 Sep 2017 13:12:39 GMT +Content-Length: 0 + + + + + + + + + + + + + +
Your file have been uploaded!

+ File #1: /uploads/vuoto.txt
+
+
+ Go Back
+ + + + + + + + + + + + + + +
Your file have been uploaded!

+ File #1: /uploads/operazione.xml
+
+
+ Go Back
+ + +HTTP/1.1 505 HTTP Version Not Supported +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Length: 0 + +HTTP/1.1 501 Not Implemented +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 256 + + + +501 Not Implemented + +

Not Implemented

+

Sorry, the method you requested is not implemented

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 411 Length Required +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Length: 0 + +HTTP/1.1 413 Request Entity Too Large +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Length: 0 + +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT, COPY, MOVE, LOCK, UNLOCK, MKCOL, PROPFIND, PATCH, PURGE, MERGE, REPORT, CHECKOUT, MKACTIVITY, NOTIFY, MSEARCH, SUBSCRIBE, UNSUBSCRIBE +Content-Length: 0 + +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 254 + + + +404 Not Found + +

Not Found

+

Your requested URL "/index.php" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 257 + +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 344 + + + +404 Not Found + +

Not Found

+

Your requested URL "/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 403 Forbidden +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 304 + + + +403 Forbidden + +

Forbidden

+

You don't have permission to access "/../../../../linux/include/generated/uapi/linux/version.h" on this server

+
+
ULib Server
+ +HTTP/1.1 500 Internal Server Error +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 548 + + + +500 Internal Server Error + +

Internal Server Error

+

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/plain; charset=UTF-8 +Content-Length: 21 + +pippo pluto paperino +HTTP/1.1 401 Authorization Required +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +WWW-Authenticate: Basic realm="Protected Area" +Content-Length: 444 + + + +401 Authorization Required + +

Authorization Required

+

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Expires: Sat, 01 Sep 2018 13:12:41 GMT +Last-Modified: Fri, 20 Feb 2009 14:50:49 GMT +Content-Length: 63 + +this is the web_server testsuite inp/http/data/index.html file +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Range: bytes 0-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:42 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 64 + +123456781234567 +345678903456789 +234567892345678 +012345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Range: bytes 0-31/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:42 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 32 + +123456781234567 +345678903456789 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Range: bytes 32-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:42 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 32 + +234567892345678 +012345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Range: bytes 32-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:42 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 32 + +234567892345678 +012345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 230 +Content-Type: multipart/byteranges; boundary="=_12970465471033734386" + + +--=_12970465471033734386 +Content-Range: bytes 0-0/64 +Content-Type: text/html; charset=UTF-8 + +1 +--=_12970465471033734386 +Content-Range: bytes 63-63/64 +Content-Type: text/html; charset=UTF-8 + + + +--=_12970465471033734386--HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Range: bytes 50-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:42 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 14 + +2345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 250 +Content-Type: multipart/byteranges; boundary="=_12970465471033734387" + + +--=_12970465471033734387 +Content-Range: bytes 10-19/64 +Content-Type: text/html; charset=UTF-8 + +34567 +3456 +--=_12970465471033734387 +Content-Range: bytes 50-59/64 +Content-Type: text/html; charset=UTF-8 + +2345670123 +--=_12970465471033734387--HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:42 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 64 + +123456781234567 +345678903456789 +234567892345678 +012345670123456 +HTTP/1.1 204 No Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 0 + +HTTP/1.1 204 No Content +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 0 + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Encoding: gzip +Content-Type: text/html; charset=UTF-8 +Last-Modified: Wed, 30 Aug 2017 15:16:34 GMT +Content-Length: 293 + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Last-Modified: Wed, 30 Aug 2017 15:16:34 GMT +Content-Length: 562 + +Index of tmp

Index of directory: tmp


Up one level
c 4 Bytes01/09/2017 13:12:32

ULib Server
HTTP/1.1 304 Not Modified +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 0 + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 1669 + + + + Welcome to ULib Web Server! + + + + +
+

Welcome to ULib Web Server!

+
+ + +
+ + + + + + +
+ + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 1908 + +
+ssi_begin
+This page last updated: Friday, 30-Oct-2015 15:20:57 GMT
+
+ +1: ok + + +2: ok + + +3: ok + + +4: ok + + +
+SSI_BEGIN
+Name of user: nobody
+
+Document name: ssi1.shtml
+
+Document URI: /SSI/ssi1.shtml
+
+It's now: Friday, 01-Sep-2017 13:12:42 GMT
+
+It's now: Friday, 01-Sep-2017 15:12:42 CEST
+
+This page is:     179 Bytes
+
+This file last modified: August 12, 2015
+
+You're using: 
+
+$HTTP_X_SENDFILE: 
+
+
+start PRINTENV
+--------------
+QUERY_STRING=
+REQUEST_URI=/SSI/ssi1.shtml
+CONTENT_LENGTH=0
+REQUEST_METHOD=GET
+SCRIPT_NAME=/SSI/ssi1.shtml
+SERVER_NAME=stefano
+SERVER_PORT=4443
+HTTP_HOST=10.30.1.131
+HTTPS=on
+SERVER_PROTOCOL=HTTP/1.1
+SERVER_ADDR=192.168.42.144
+DOCUMENT_ROOT=/usr/src/ULib-1.4.2/tests/examples/docroot
+SERVER_SOFTWARE=ULib/1.4.2
+REMOTE_PORT=51330
+REMOTE_ADDR=127.0.0.1
+SESSION_ID=127.0.0.1:0
+REQUEST_ID=127.0.0.1:51330:0
+PWD=/usr/src/ULib-1.4.2/tests/examples/docroot
+PATH=/usr/local/bin:/usr/bin:/bin
+HTTP_X_SENDFILE=puppamelo
+--------------
+end   PRINTENV
+ 
+
+start LS
+--------------
+total 392
+drwxr-xr-x 3 nobody nobody   4096 Oct 30  2015 .
+drwxr-xr-x 8 nobody nobody 368640 Sep  1 15:12 ..
+drwxr-xr-x 3 nobody nobody   4096 Aug 25  2014 earth
+-rw-r--r-- 1 nobody nobody    179 Aug 12  2015 embed.c
+-rw-r--r-- 3 nobody nobody    160 Mar 28  2011 index.shtml
+-rw-r--r-- 1 nobody nobody    352 Nov  8  2011 menu.shtml
+-rw-r--r-- 1 nobody nobody    917 Oct 30  2015 ssi1.shtml
+-rw-r--r-- 1 nobody nobody   1190 Aug 25  2014 ssi2.shtml
+--------------
+end   LS
+
+start CGI
+--------------
+Content-Type: text/html
+
+You're not using Microsoft® Internet Explorer® 5.0
+--------------
+end   CGI
+SSI include failed!
+SSI include failed!
+/*int main(void) {
+  struct mg_context* ctx;
+  const char *options[] = {"listening_ports", LISTENING_PORT, NULL};
+
+  ctx = mg_start(callback, options);
+  pause();
+  return 0;
+}*/
+
+SSI_END
+
+ + +
+ssi_end
+
+HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 115 +X-Real-IP: 10.30.1.131 +Set-Cookie: ulib.s1=; expires=Thu, 31 Aug 2017 13:12:42 GMT +Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303433353739363226094efdca715122640f15eba920595153; expires=Sat, 02 Sep 2017 13:12:42 GMT +Set-Cookie: TestCookie=pippo +Content-Type: text/html; charset=iso-8859-1 + +UID = Steve Johnson +HTTP_COOKIE = name1=value1, name2=value2; name3=value3, name4=value4 +ULIB_SESSION = +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Encoding: gzip +Content-Type: text/html; charset=UTF-8 +Content-Length: 718 + +UQO0~8Im%40^Si  \''m;'iڲD%*cw\L,EJpJ j}'cxhXBl2RYXP<_V|5o7=(2XlUr΂v5 Iy:J27tU.h /=.`Br!w t6+٧ 9דHQ<|OEZ n[:i |O{DH[z3c5?_L&LVibl!&&֩H֐)+.C дް4|tb]PS]Xhonyb)'̃F;2N"JSZʼnɼ,䴎2yB" ,L.uJ3&PdKuӹI“`YɿGQe\ז!9*NIvekRNIVHw9YuP>̎:vtzWf"X R?IRc:LmUEcO>?tt=OuBaiS-ELi..ek=wjm1 p_N/CrBէùVJ -B>prYI𾧫svNIIKltw?mMc{ *HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 211 +Content-Type: text/html + +

Esempio di CGI

scritto in linguaggio rubyHTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Length: 72 +Content-Type: application/jsonrequest + +{"user":"doctoravatar@penzance.com","t":"vlIj","forecast":7,"zip":94089}HTTP/1.1 302 Moved Temporarily +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Location: http://10.30.1.131/?ticket=U2FsdGVkX1+/AYaicDGB1EReb1+EErzD/ar1Wrv8wrXpYEj9RoN3RlzFWK5ykUyRMg4AicmBMNQsUQDWZENgiQ +X-Powered-By: PHP/5.2.6-pl7-gentoo +X-Powered-By: PHP/5.2.6-pl7-gentoo +Content-Length: 365 + + + +302 Moved Temporarily + +

Moved Temporarily

+

The document has moved here

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: image/x-icon +Expires: Sat, 01 Sep 2018 13:12:41 GMT +Last-Modified: Fri, 24 Jul 2009 16:01:29 GMT +Content-Length: 318 + +(( Fi " " " " " 33333HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 253 + + + +404 Not Found + +

Not Found

+

Your requested URL "/dumbfuck" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 273 + + + +404 Not Found + +

Not Found

+

Your requested URL "/get_no_headers_no_body/world" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 267 + + + +404 Not Found + +

Not Found

+

Your requested URL "/get_one_header_no_body" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 280 + + + +404 Not Found + +

Not Found

+

Your requested URL "/get_funky_content_length_body_hello" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 269 + + + +404 Not Found + +

Not Found

+

Your requested URL "/post_identity_body_world" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 271 + + + +404 Not Found + +

Not Found

+

Your requested URL "/post_chunked_all_your_base" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 269 + + + +404 Not Found + +

Not Found

+

Your requested URL "/two_chunks_mult_zero_end" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 271 + + + +404 Not Found + +

Not Found

+

Your requested URL "/chunked_w_trailing_headers" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 276 + + + +404 Not Found + +

Not Found

+

Your requested URL "/chunked_w_bullshit_after_length" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 253 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test.cgi" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 101 Switching Protocols +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= + +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/demo" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 403 Forbidden +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 248 + + + +403 Forbidden + +

Forbidden

+

You don't have permission to access "*" on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 254 + + + +404 Not Found + +

Not Found

+

Your requested URL "/index.php" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:42 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 253 + + + +404 Not Found + +

Not Found

+

Your requested URL "/file.txt" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:47 GMT +Server: ULib +Connection: close +Set-Cookie: ulib.s0=5374657665204a6f686e736f6e26313530343335373936372676d91dfd267708f859b0162d0ae39c70; expires=Sat, 02 Sep 2017 13:12:47 GMT +Content-Length: 0 + + + + + + + + + + + + + +
Your file have been uploaded!

+ File #1: /uploads/vuoto.txt
+
+
+ Go Back
+ + + + + + + + + + + + + + +
Your file have been uploaded!

+ File #1: /uploads/operazione.xml
+
+
+ Go Back
+ + +HTTP/1.1 505 HTTP Version Not Supported +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Length: 0 + +HTTP/1.1 501 Not Implemented +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 256 + + + +501 Not Implemented + +

Not Implemented

+

Sorry, the method you requested is not implemented

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 411 Length Required +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Length: 0 + +HTTP/1.1 413 Request Entity Too Large +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Length: 0 + +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 400 Bad Request +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 263 + + + +400 Bad Request + +

Bad Request

+

Your browser sent a request that this server could not understand

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT, COPY, MOVE, LOCK, UNLOCK, MKCOL, PROPFIND, PATCH, PURGE, MERGE, REPORT, CHECKOUT, MKACTIVITY, NOTIFY, MSEARCH, SUBSCRIBE, UNSUBSCRIBE +Content-Length: 0 + +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Content-Length: 254 + + + +404 Not Found + +

Not Found

+

Your requested URL "/index.php" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 257 + +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 344 + + + +404 Not Found + +

Not Found

+

Your requested URL "/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 403 Forbidden +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 304 + + + +403 Forbidden + +

Forbidden

+

You don't have permission to access "/../../../../linux/include/generated/uapi/linux/version.h" on this server

+
+
ULib Server
+ +HTTP/1.1 500 Internal Server Error +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 548 + + + +500 Internal Server Error + +

Internal Server Error

+

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/plain; charset=UTF-8 +Content-Length: 21 + +pippo pluto paperino +HTTP/1.1 401 Authorization Required +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +WWW-Authenticate: Basic realm="Protected Area" +Content-Length: 444 + + + +401 Authorization Required + +

Authorization Required

+

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Expires: Sat, 01 Sep 2018 13:12:49 GMT +Last-Modified: Fri, 20 Feb 2009 14:50:49 GMT +Content-Length: 63 + +this is the web_server testsuite inp/http/data/index.html file +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Range: bytes 0-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:50 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 64 + +123456781234567 +345678903456789 +234567892345678 +012345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Range: bytes 0-31/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:50 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 32 + +123456781234567 +345678903456789 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Range: bytes 32-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:50 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 32 + +234567892345678 +012345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Range: bytes 32-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:50 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 32 + +234567892345678 +012345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 227 +Content-Type: multipart/byteranges; boundary="=_4251496595678644582" + + +--=_4251496595678644582 +Content-Range: bytes 0-0/64 +Content-Type: text/html; charset=UTF-8 + +1 +--=_4251496595678644582 +Content-Range: bytes 63-63/64 +Content-Type: text/html; charset=UTF-8 + + + +--=_4251496595678644582--HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Range: bytes 50-63/64 +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:50 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 14 + +2345670123456 +HTTP/1.1 206 Partial Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 247 +Content-Type: multipart/byteranges; boundary="=_4251496595678644583" + + +--=_4251496595678644583 +Content-Range: bytes 10-19/64 +Content-Type: text/html; charset=UTF-8 + +34567 +3456 +--=_4251496595678644583 +Content-Range: bytes 50-59/64 +Content-Type: text/html; charset=UTF-8 + +2345670123 +--=_4251496595678644583--HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/plain; charset=us-ascii +Expires: Sat, 01 Sep 2018 13:12:50 GMT +Last-Modified: Sun, 02 Mar 2008 09:26:05 GMT +Content-Length: 64 + +123456781234567 +345678903456789 +234567892345678 +012345670123456 +HTTP/1.1 204 No Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 0 + +HTTP/1.1 204 No Content +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 0 + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Encoding: gzip +Content-Type: text/html; charset=UTF-8 +Last-Modified: Wed, 30 Aug 2017 15:16:34 GMT +Content-Length: 293 + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Last-Modified: Wed, 30 Aug 2017 15:16:34 GMT +Content-Length: 562 + +Index of tmp

Index of directory: tmp


Up one level
c 4 Bytes01/09/2017 13:12:32

ULib Server
HTTP/1.1 304 Not Modified +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 0 + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 1669 + + + + Welcome to ULib Web Server! + + + + +
+

Welcome to ULib Web Server!

+
+ + +
+ + + + + + +
+ + +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 1908 + +
+ssi_begin
+This page last updated: Friday, 30-Oct-2015 15:20:57 GMT
+
+ +1: ok + + +2: ok + + +3: ok + + +4: ok + + +
+SSI_BEGIN
+Name of user: nobody
+
+Document name: ssi1.shtml
+
+Document URI: /SSI/ssi1.shtml
+
+It's now: Friday, 01-Sep-2017 13:12:50 GMT
+
+It's now: Friday, 01-Sep-2017 15:12:50 CEST
+
+This page is:     179 Bytes
+
+This file last modified: August 12, 2015
+
+You're using: 
+
+$HTTP_X_SENDFILE: 
+
+
+start PRINTENV
+--------------
+QUERY_STRING=
+REQUEST_URI=/SSI/ssi1.shtml
+CONTENT_LENGTH=0
+REQUEST_METHOD=GET
+SCRIPT_NAME=/SSI/ssi1.shtml
+SERVER_NAME=stefano
+SERVER_PORT=4443
+HTTP_HOST=10.30.1.131
+HTTPS=on
+SERVER_PROTOCOL=HTTP/1.1
+SERVER_ADDR=192.168.42.144
+DOCUMENT_ROOT=/usr/src/ULib-1.4.2/tests/examples/docroot
+SERVER_SOFTWARE=ULib/1.4.2
+REMOTE_PORT=51722
+REMOTE_ADDR=127.0.0.1
+SESSION_ID=127.0.0.1:0
+REQUEST_ID=127.0.0.1:51722:0
+PWD=/usr/src/ULib-1.4.2/tests/examples/docroot
+PATH=/usr/local/bin:/usr/bin:/bin
+HTTP_X_SENDFILE=puppamelo
+--------------
+end   PRINTENV
+ 
+
+start LS
+--------------
+total 392
+drwxr-xr-x 3 nobody nobody   4096 Oct 30  2015 .
+drwxr-xr-x 8 nobody nobody 368640 Sep  1 15:12 ..
+drwxr-xr-x 3 nobody nobody   4096 Aug 25  2014 earth
+-rw-r--r-- 1 nobody nobody    179 Aug 12  2015 embed.c
+-rw-r--r-- 3 nobody nobody    160 Mar 28  2011 index.shtml
+-rw-r--r-- 1 nobody nobody    352 Nov  8  2011 menu.shtml
+-rw-r--r-- 1 nobody nobody    917 Oct 30  2015 ssi1.shtml
+-rw-r--r-- 1 nobody nobody   1190 Aug 25  2014 ssi2.shtml
+--------------
+end   LS
+
+start CGI
+--------------
+Content-Type: text/html
+
+You're not using Microsoft® Internet Explorer® 5.0
+--------------
+end   CGI
+SSI include failed!
+SSI include failed!
+/*int main(void) {
+  struct mg_context* ctx;
+  const char *options[] = {"listening_ports", LISTENING_PORT, NULL};
+
+  ctx = mg_start(callback, options);
+  pause();
+  return 0;
+}*/
+
+SSI_END
+
+ + +
+ssi_end
+
+HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 115 +X-Real-IP: 10.30.1.131 +Set-Cookie: ulib.s1=; expires=Thu, 31 Aug 2017 13:12:50 GMT +Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303433353739373026653ea25594d9e92d59b4c8c9ae86b229; expires=Sat, 02 Sep 2017 13:12:50 GMT +Set-Cookie: TestCookie=pippo +Content-Type: text/html; charset=iso-8859-1 + +UID = Steve Johnson +HTTP_COOKIE = name1=value1, name2=value2; name3=value3, name4=value4 +ULIB_SESSION = +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Encoding: gzip +Content-Type: text/html; charset=UTF-8 +Content-Length: 718 + +UQO0~8Im%40^Si  \''m;'iڲD%*cw\L,EJpJ j}'cxhXBl2RYXP<_V|5o7=(2XlUr΂v5 Iy:J27tU.h /=.`Br!w t6+٧ 9דHQ<|OEZ n[:i |O{DH[z3c5?_L&LVibl!&&֩H֐)+.C дް4|tb]PS]Xhonyb)'̃F;2N"JSZʼnɼ,䴎2yB" ,L.uJ3&PdKuӹI“`YɿGQe\ז!9*NIvekRNIVHw9YuP>̎:vtzWf"X R?IRc:LmUEcO>?tt=OuBaiS-ELi..ek=wjm1 p_N/CrBէùVJ -B>prYI𾧫svNIIKltw?mMc{ *HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 211 +Content-Type: text/html + +

Esempio di CGI

scritto in linguaggio rubyHTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Length: 72 +Content-Type: application/jsonrequest + +{"user":"doctoravatar@penzance.com","t":"vlIj","forecast":7,"zip":94089}HTTP/1.1 302 Moved Temporarily +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Connection: close +Content-Type: text/html; charset=UTF-8 +Location: http://10.30.1.131/?ticket=U2FsdGVkX1+/AYaicDGB1EReb1+EErzD/ar1Wrv8wrXpYEj9RoN3RlzFWK5ykUyRMg4AicmBMNQsUQDWZENgiQ +X-Powered-By: PHP/5.2.6-pl7-gentoo +X-Powered-By: PHP/5.2.6-pl7-gentoo +Content-Length: 365 + + + +302 Moved Temporarily + +

Moved Temporarily

+

The document has moved here

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: image/x-icon +Expires: Sat, 01 Sep 2018 13:12:49 GMT +Last-Modified: Fri, 24 Jul 2009 16:01:29 GMT +Content-Length: 318 + +(( Fi " " " " " 33333HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 253 + + + +404 Not Found + +

Not Found

+

Your requested URL "/dumbfuck" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 273 + + + +404 Not Found + +

Not Found

+

Your requested URL "/get_no_headers_no_body/world" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 267 + + + +404 Not Found + +

Not Found

+

Your requested URL "/get_one_header_no_body" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 280 + + + +404 Not Found + +

Not Found

+

Your requested URL "/get_funky_content_length_body_hello" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 269 + + + +404 Not Found + +

Not Found

+

Your requested URL "/post_identity_body_world" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 271 + + + +404 Not Found + +

Not Found

+

Your requested URL "/post_chunked_all_your_base" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 269 + + + +404 Not Found + +

Not Found

+

Your requested URL "/two_chunks_mult_zero_end" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 271 + + + +404 Not Found + +

Not Found

+

Your requested URL "/chunked_w_trailing_headers" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 276 + + + +404 Not Found + +

Not Found

+

Your requested URL "/chunked_w_bullshit_after_length" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 253 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test.cgi" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/test" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 101 Switching Protocols +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= + +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 249 + + + +404 Not Found + +

Not Found

+

Your requested URL "/demo" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 403 Forbidden +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 248 + + + +403 Forbidden + +

Forbidden

+

You don't have permission to access "*" on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 254 + + + +404 Not Found + +

Not Found

+

Your requested URL "/index.php" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 404 Not Found +Date: Fri, 01 Sep 2017 13:12:50 GMT +Server: ULib +Content-Type: text/html; charset=UTF-8 +Content-Length: 253 + + + +404 Not Found + +

Not Found

+

Your requested URL "/file.txt" was not found on this server

+
+
ULib Server
+ +HTTP/1.1 200 OK +Date: Fri, 01 Sep 2017 13:12:55 GMT +Server: ULib +Connection: close +Set-Cookie: ulib.s0=5374657665204a6f686e736f6e263135303433353739373526d57f2ed301249e8cbbef99d1ec9225b6; expires=Sat, 02 Sep 2017 13:12:55 GMT Content-Length: 0 diff --git a/tests/ulib/test_string.cpp b/tests/ulib/test_string.cpp index 61a3acc8..c3700513 100644 --- a/tests/ulib/test_string.cpp +++ b/tests/ulib/test_string.cpp @@ -1494,20 +1494,11 @@ U_EXPORT main(int argc, char* argv[]) U_TRACE(5, "main(%d)", argc) - bool ok = u_isUTF8((const unsigned char*)U_CONSTANT_TO_PARAM("..M-^X@M-/..M-^X@1M-/..\xC3\xBC\x88\x01\x0BM-^X@M-/..M-^X@M-/..M-^X@M-/../winnt/system32/cmd.exe")); - - U_INTERNAL_ASSERT_EQUALS(ok, false) - - UCrono crono; - UString x(100U), y = U_STRING_FROM_CONSTANT("0.0000001"), z, z1, value = U_STRING_FROM_CONSTANT("0.0"); - - UString new_value(U_CAPACITY, U_CONSTANT_TO_PARAM("%.*s; %v"), U_STRING_TO_TRACE(y), value.rep); - - value = new_value; - - U_INTERNAL_DUMP("value(%u): = %.*S", value.size(), U_STRING_TO_TRACE(value)) - - U_ASSERT( value == U_STRING_FROM_CONSTANT("0.0000001; 0.0") ) + /* + double val1 = U_STRING_FROM_CONSTANT("0").strtod(); + u__printf(1, U_CONSTANT_TO_PARAM("0 = %lf %g"), val1, val1); + exit(0); + */ U_ASSERT( U_STRING_FROM_CONSTANT("0.0").strtod() == 0.0 ) U_ASSERT( U_STRING_FROM_CONSTANT("1.0").strtod() == 1.0 ) @@ -1563,6 +1554,7 @@ U_EXPORT main(int argc, char* argv[]) #endif int i; + UString x(100U), y, z; for (i = -310; i < 310; ++i) { @@ -1636,6 +1628,23 @@ U_EXPORT main(int argc, char* argv[]) U_ASSERT( y == U_STRING_FROM_CONSTANT("10.30.1.0/24 10.1.0.1/16") ) #endif + UCrono crono; + UString z1, value = U_STRING_FROM_CONSTANT("0.0"); + + y = U_STRING_FROM_CONSTANT("0.0000001"); + + UString new_value(U_CAPACITY, U_CONSTANT_TO_PARAM("%.*s; %v"), U_STRING_TO_TRACE(y), value.rep); + + value = new_value; + + U_INTERNAL_DUMP("value(%u): = %.*S", value.size(), U_STRING_TO_TRACE(value)) + + U_ASSERT( value == U_STRING_FROM_CONSTANT("0.0000001; 0.0") ) + + bool ok = u_isUTF8((const unsigned char*)U_CONSTANT_TO_PARAM("..M-^X@M-/..M-^X@1M-/..\xC3\xBC\x88\x01\x0BM-^X@M-/..M-^X@M-/..M-^X@M-/../winnt/system32/cmd.exe")); + + U_INTERNAL_ASSERT_EQUALS(ok, false) + UString buffer(U_CAPACITY), encoded(U_CAPACITY); z1 = UStringExt::prepareForEnvironmentVar(U_STRING_FROM_CONSTANT("MasqueradeDevice=eth0 'AuthServiceAddr=http://wifi-aaa2.comune.fi.it' FullPrivateNetwork=172.16.0.0/12 "