1. 07 Jan, 2021 3 commits
  2. 29 Dec, 2020 1 commit
  3. 28 Dec, 2020 1 commit
  4. 27 Dec, 2020 1 commit
    • Tachi's avatar
      Modernize CMakeLists.txt · 6cd4d7f2
      Tachi authored
      WIth this I'm trying to fix some of the issues pointed out in #827.
      
      Changes:
      
      Use add_compile_options() instead of modifying CMAKE_CXX_FLAGS.
      
      Use -Og instead of -O0
      (from https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html :
      [-Og] is a better choice than -O0 for producing debuggable code because
      some compiler passes that collect debug information are disabled at -O0)
      
      Fix LTO check (previously it would fail because it checked only
      CMAKE_CXX_FLAGS. This didn't work when properly enabling LTO
      through CMAKE_INTERPROCEDURAL_OPTIMIZATION).
      I'm not sure if I modified it correctly since I don't really understand
      what that check is trying to do in the first place.
      
      Check for Clang or GCC when applying compiler specific flags.
      
      This changes require CMake 3.9 or higher, but I don't think this will
      cause any issues.
      6cd4d7f2
  5. 10 Dec, 2020 1 commit
    • Ian Roddis's avatar
      Rest::Router add client disconnect handlers (#852) · 9a65f409
      Ian Roddis authored
      * - Adding Router::addDisconnectHandler to handle client disconnections.
      - Adding code to call handlers on client disconnection
      
      * - Adding test case for router addDisconnectHandler and associated functionality.
      
      * Changing to 2-space indentation and other formating changes to conform to LLVM style
      
      * More format changes
      Co-authored-by: default avatarIan Roddis <gitlab@ie2r.com>
      9a65f409
  6. 30 Nov, 2020 1 commit
  7. 29 Nov, 2020 2 commits
  8. 28 Nov, 2020 1 commit
  9. 27 Nov, 2020 4 commits
  10. 26 Nov, 2020 2 commits
  11. 25 Nov, 2020 1 commit
  12. 24 Nov, 2020 2 commits
  13. 23 Nov, 2020 1 commit
  14. 18 Nov, 2020 3 commits
    • Ian Roddis's avatar
      Add peer (#838) · e171e79d
      Ian Roddis authored
      * Adding an incrementing peer ID for easier connection identification on peer disconnect
      
      * Removing the private override of onDisconnection in http::Handler
      
      * Adding unit test for onDisconnection
      
      * - Exposing a peer handle from the ResponseWriter
      - Making disconnection test a bit more deterministic; there appears to be a race condition between server.shutdown() returning and the onDisconnection() callback succeeding.
      - Adding Active Connections info in test case to demonstrate usage.
      
      * Reducing verbosity of test output
      
      * Fixing getID vs getId call, removing block comment around other tests
      Co-authored-by: default avatarIan Roddis <gitlab@ie2r.com>
      e171e79d
    • Dennis Jenkins's avatar
      Revert "Adding a Peer ID to identify connections (#836)" (#837) · 551cbb47
      Dennis Jenkins authored
      This reverts commit eb9102dd.
      551cbb47
    • Ian Roddis's avatar
      Adding a Peer ID to identify connections (#836) · eb9102dd
      Ian Roddis authored
      * Adding an incrementing peer ID for easier connection identification on peer disconnect
      
      * Removing the private override of onDisconnection in http::Handler
      
      * Adding unit test for onDisconnection
      
      * - Exposing a peer handle from the ResponseWriter
      - Making disconnection test a bit more deterministic; there appears to be a race condition between server.shutdown() returning and the onDisconnection() callback succeeding.
      - Adding Active Connections info in test case to demonstrate usage.
      
      * Reducing verbosity of test output
      Co-authored-by: default avatarIan Roddis <gitlab@ie2r.com>
      eb9102dd
  15. 28 Oct, 2020 1 commit
  16. 17 Oct, 2020 1 commit
  17. 16 Oct, 2020 1 commit
    • Benjamin Beichler's avatar
      fix chunked transfer decoding · 88a30838
      Benjamin Beichler authored
      - usage of complete body_.size() seems is wrong (only valid if there is one chunk?)
      - use separate var to count already received bytes of chunk
      88a30838
  18. 06 Oct, 2020 1 commit
    • Jiankun Yu's avatar
      fix issue-193 (#819) · a54a4fab
      Jiankun Yu authored
      * fix issue-193
      
      The client implementation isn't compliant with HTTP 1.1 standard, to be
      specific, it doesn't honor the "Connection: close" response header. As a
      result, whenever a new request is sent, a new tcp connection is opened
      to the server and is never closed (unless the server close it).
      
      The best place to close the connection is in Connection::OnDone() method,
      however, that method is provided too early, in the Connection::asyncPerform()
      method, where the Http::Response object is not yet available. It's also
      incorrect to blindly close the connection in OnDone() method, as there might
      be more data from server.
      
      This commit explicitly closes all opened connections on Client::shutdown(),
      to guarantee all network resources are recycled on that call.
      
      It's impossible to write any unit test case verify it, the connection pool
      is invisible to Client users. It passed manual tests on crafted scenarios.
      
      To verify this, start a Pistache server from the examples, then use the Client
      library to send some requests to the server, and don't terminate client side
      program. Use "netstat -an | grep <server_port>" to see if there are remaining
      connections in ESTABLISHED state after client.shutdown() is called.
      Signed-off-by: default avatarJiankun Yu <yujiankun@hotmail.com>
      
      * fix formatting issue
      a54a4fab
  19. 28 Aug, 2020 1 commit
  20. 25 Aug, 2020 1 commit
  21. 17 Aug, 2020 1 commit
    • Fabrice Fontaine's avatar
      CMakeLists.txt: add C language to project statement (#813) · 718aabba
      Fabrice Fontaine authored
      This will fix the detection of atomic:
      
      -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
      -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
      -- Looking for __atomic_load_8 in atomic
      -- Looking for __atomic_load_8 in atomic - not found
      CMake Error at CMakeModules/CheckAtomic.cmake:76 (message):
        Host compiler appears to require libatomic for 64-bit operations, but
        cannot find it.
      Call Stack (most recent call first):
        CMakeLists.txt:19 (include)
      
      Indeed if C language is not enabled, the test will be run with the C++
      compiler resulting in the following error:
      
      Building CXX object CMakeFiles/cmTC_fad22.dir/CheckFunctionExists.cxx.o
      /tmp/instance-0/output-1/host/bin/mipsel-linux-g++ --sysroot=/tmp/instance-0/output-1/host/mipsel-buildroot-linux-gnu/sysroot    -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_FORTIFY_SOURCE=1 -Wall -Wconversion -pedantic -Wextra -Wno-missing-field-initializers -DCHECK_FUNCTION_EXISTS=__atomic_load_8  -DNDEBUG   -o CMakeFiles/cmTC_fad22.dir/CheckFunctionExists.cxx.o -c /tmp/instance-0/output-1/build/pistache-f2f5a50f/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx
      <command-line>: error: new declaration 'char __atomic_load_8()' ambiguates built-in declaration 'long long unsigned int __atomic_load_8(const volatile void*, int)' [-fpermissive]
      /tmp/instance-0/output-1/build/pistache-f2f5a50f/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx:7:3: note: in expansion of macro 'CHECK_FUNCTION_EXISTS'
         CHECK_FUNCTION_EXISTS(void);
         ^~~~~~~~~~~~~~~~~~~~~
      /tmp/instance-0/output-1/build/pistache-f2f5a50f/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx: In function 'int main(int, char**)':
      /tmp/instance-0/output-1/build/pistache-f2f5a50f/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx:17:25: error: too few arguments to function 'long long unsigned int __atomic_load_8(const volatile void*, int)'
         CHECK_FUNCTION_EXISTS();
                               ^
      
      whereas with a C compiler, we'll get:
      
      Building C object CMakeFiles/cmTC_4b0f4.dir/CheckFunctionExists.c.o
      /home/fabrice/buildroot/output/host/bin/riscv32-linux-gcc --sysroot=/home/fabrice/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DCHECK_FUNCTION_EXISTS=__atomic_load_8  -DNDEBUG   -o CMakeFiles/cmTC_4b0f4.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
      <command-line>: warning: conflicting types for built-in function ‘__atomic_load_8’ [-Wbuiltin-declaration-mismatch]
      /usr/share/cmake-3.16/Modules/CheckFunctionExists.c:7:3: note: in expansion of macro ‘CHECK_FUNCTION_EXISTS’
         CHECK_FUNCTION_EXISTS(void);
         ^~~~~~~~~~~~~~~~~~~~~
      Linking C executable cmTC_4b0f4
      /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4b0f4.dir/link.txt --verbose=1
      /home/fabrice/buildroot/output/host/bin/riscv32-linux-gcc --sysroot=/home/fabrice/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DCHECK_FUNCTION_EXISTS=__atomic_load_8  -DNDEBUG    CMakeFiles/cmTC_4b0f4.dir/CheckFunctionExists.c.o  -o cmTC_4b0f4  -latomic
      
      Fixes:
       - http://autobuild.buildroot.org/results/2bf06c6a9e55b449ec5875cf9415a9e55b2065d6Signed-off-by: default avatarFabrice Fontaine <fontaine.fabrice@gmail.com>
      718aabba
  22. 16 Aug, 2020 1 commit
  23. 15 Aug, 2020 1 commit
  24. 03 Aug, 2020 1 commit
    • Kip's avatar
      Shared-library soname is now generated correctly (#809) · ab52c549
      Kip authored
      * Add support for interface versioning so applications don't break...
      
      * {CMakeLists.txt,src/CMakeLists.txt}: Shared-library soname is now generated correctly...
      version.txt: Added SONAME major and minor fields...
      README.md: Add versioning notes. In particular, when to update interface version...
      debian/changelog: Fixed lintian complaining about a malformed changelog for non-native package...
      ab52c549
  25. 02 Aug, 2020 1 commit
  26. 22 Jul, 2020 1 commit
  27. 21 Jul, 2020 1 commit
  28. 20 Jul, 2020 1 commit
  29. 18 Jul, 2020 1 commit
  30. 17 Jul, 2020 1 commit