Commit graph

  • c21768fae9 Server: on session upgrade, remove connection from connections eidheim 2017-07-18 18:25:44 +02:00
  • 88177647b8 Client: added connections_mutex unlocks when performing reconnect eidheim 2017-07-15 15:52:22 +02:00
  • d0e417cdd9 Fixes #143: Content-Length is now initialized to 0 eidheim 2017-07-15 14:53:38 +02:00
  • 291c316a28 Resolved conflicts eidheim 2017-07-15 14:46:49 +02:00
  • 1f474f377b Made Server::stop exception safe eidheim 2017-07-15 14:41:57 +02:00
  • 35ea8a950e Client: now lets socket destructor close itself eidheim 2017-07-15 10:57:12 +02:00
  • eeaf66cf2c Fixes #142: a new socket is created when a https connection is reconnected, since a second SSL handshake cannot be made on the same socket. Also now removing failed connections from the connections collection. eidheim 2017-07-15 07:30:27 +02:00
  • 3541dd7879 ::stop now closes connections even though internal io_service is used eidheim 2017-07-12 10:03:52 +02:00
  • c03e378e69 Comments addition and cleanup eidheim 2017-07-10 06:58:07 +02:00
  • d8b8716a17 Session and Connection cleanup eidheim 2017-07-09 12:54:56 +02:00
  • 653e24296b Improved includes in utility.hpp eidheim 2017-07-09 22:04:50 +02:00
  • dfd7895328 Shared mutex is no longer used when using internal io_service eidheim 2017-07-09 08:34:53 +02:00
  • 6c2c8d680b No longer stores pointer to Server/Client instance in Session objects. Some other cleanups as well. eidheim 2017-07-08 17:51:53 +02:00
  • f3f527467f Now close connections when Server::stop is called eidheim 2017-07-07 23:17:10 +02:00
  • 490e33e2d1 Client::close renamed to Client::stop eidheim 2017-07-07 23:19:15 +02:00
  • 76f923d7bd Reverted stop changes due to complications when running on one core eidheim 2017-07-07 22:38:44 +02:00
  • 7d5599b8e5 Added Server::stop test eidheim 2017-07-07 22:23:39 +02:00
  • 6c6f30302a Fixed io_test (out of stack?), also fixed concurrent sync requests count on request error. eidheim 2017-07-07 17:36:27 +02:00
  • 06d3c701e1 Fixed io_test (out of stack?), also fixed concurrent sync requests count on request error. eidheim 2017-07-07 17:36:27 +02:00
  • 28eeef7d65 Synchronous client request calls is now safe to use concurrently eidheim 2017-07-07 17:16:53 +02:00
  • fd764d908c Synchronous client request calls is now safe to use concurrently eidheim 2017-07-07 17:16:53 +02:00
  • 9b5063f422 Replaced Server/Client::shared_from_this with asio callback checks if the Server/Client has been destroyed. Also added SharedMutex to utility.hpp. eidheim 2017-07-05 10:16:31 +02:00
  • 53c9ff64c0 Corrected on_error's error_code parameter eidheim 2017-07-05 17:41:32 +02:00
  • 0f2ab616ec Reverted namespace asio = asio for standalone asio because of gcc error eidheim 2017-07-05 13:15:01 +02:00
  • 8862c62b60 Added SimpleWeb::asio namespace when using standalone asio as well eidheim 2017-07-05 12:57:45 +02:00
  • fa5a3bdc4f Reverted namespace asio = asio for standalone asio because of gcc error eidheim 2017-07-05 13:15:01 +02:00
  • bdac513da0 Added SimpleWeb::asio namespace when using standalone asio as well eidheim 2017-07-05 12:57:45 +02:00
  • d9416c2566 Added Client::close, and Client::connections and Client::connections_mutex are no longer shared_ptrs eidheim 2017-07-04 23:07:08 +02:00
  • 16aa958903 Server::Session::timer is now of type unique_ptr instead of shared_ptr eidheim 2017-07-04 18:10:58 +02:00
  • 57a0c83f64 Slightly improved default_resource example eidheim 2017-07-04 14:11:49 +02:00
  • 68f1e8413a Reverted resource/response function parameter types shared_ptr& to shared_ptr. No real value added here, just more complicated code. Compiler might also optimise the now const lambda captures. eidheim 2017-07-04 12:04:07 +02:00
  • 0662cbdfb7 Added timeout to Server::Response::send, and some cleanup eidheim 2017-07-04 10:43:37 +02:00
  • cc1a8fc614 The function Server::send was moved to Server::Response::send eidheim 2017-07-04 09:38:01 +02:00
  • a69e32290f Server::send response parameter changed to const. Some cleanup of examples related to this. eidheim 2017-07-04 09:17:36 +02:00
  • c934c9aefe Timeout timers and Client's connection close cleanup eidheim 2017-07-04 00:10:02 +02:00
  • 30f4f94a03 ServerBase now derives from and use std::enable_shared_from_this eidheim 2017-07-03 16:58:47 +02:00
  • 026f47f195 ClientBase now derives from and use std::enable_shared_from_this eidheim 2017-07-03 15:42:21 +02:00
  • 1992bbb4b4 Preparation for std::enable_shared_from_this: Server- and Client-constructors are no longer public, use ::create instead eidheim 2017-07-03 15:02:35 +02:00
  • 80ab651fca Removed deprecated functions eidheim 2017-07-03 14:31:22 +02:00
  • b3a1d48c0a Callback shared_ptr parameters are now shared_ptr& eidheim 2017-07-03 13:27:47 +02:00
  • 0c9cb000b4 Server::Request::path is split into path and query_string eidheim 2017-07-03 11:44:46 +02:00
  • 2bb51a9fb0 Added crt and key files to .gitignore eidheim 2017-07-03 11:49:39 +02:00
  • d1798396ac Config::thread_pool_size is no longer checked if io_service is set (that is, when external io_service is used) before calling start eidheim 2017-07-03 10:22:44 +02:00
  • b4756d0de3 Removed erroneous content type from examples eidheim 2017-07-01 08:40:30 +02:00
  • f746027d37 Added error checks to Base64 encode and decode eidheim 2017-06-30 19:55:16 +02:00
  • 2d3062265d Added longer Base64 decode/encode test eidheim 2017-06-29 12:46:54 +02:00
  • f4b46cd3dc Updated README.md to include standalone asio eidheim 2017-06-28 08:27:52 +02:00
  • e50d2fc63a Added .clang-format file and applied style to source files eidheim 2017-06-26 15:19:52 +02:00
  • 3ee9f8dc52 Added all header files to cmake install target. Also added -O3 to one test on travis eidheim 2017-06-26 11:50:21 +02:00
  • bf379ebcba Server::Response::write convenience functions no longer write Content-Length if close_connection_after_response is set. Also added some doxygen comments eidheim 2017-06-26 07:16:50 +02:00
  • 98d9617244 Added QueryString class with create and parse functions to utility.hpp eidheim 2017-06-25 16:43:49 +02:00
  • 1d9e900f44 Added Percent::encode eidheim 2017-06-25 14:32:38 +02:00
  • 48d74a974a Server::Response::write convenience functions now always add Content-Length header field if it does not exists and if chunked transfer encoding is not used eidheim 2017-06-25 09:21:00 +02:00
  • 985809791c Resolved unambiguous Server::Response::write() functions eidheim 2017-06-25 08:46:50 +02:00
  • 362c1a2591 Now closes unwanted client connections when a request is finished. Also added additional tests eidheim 2017-06-25 07:20:03 +02:00
  • 20d3c44366 *Fixes #135: memory leak that was introduces Jun 17, 2017 in e1aebba344 eidheim 2017-06-24 13:19:53 +02:00
  • c9c6ee3d98 Removed unnecessary includes eidheim 2017-06-24 10:46:42 +02:00
  • 0a72f6f280 Further cleanup of examples eidheim 2017-06-23 16:28:25 +02:00
  • 850dcd6601 Cleanup of examples eidheim 2017-06-23 10:28:06 +02:00
  • dcbb45175a Added convenience functions to examples eidheim 2017-06-23 08:05:48 +02:00
  • 6cf3be082d Minor change to include guard in crypto.hpp eidheim 2017-06-23 07:14:22 +02:00
  • 8ec36d19fd Changed some parameters from std::iostream to std::istream in Client and Server eidheim 2017-06-23 07:00:16 +02:00
  • 361ac21518 Cleanup of synchronous Client::request functions eidheim 2017-06-22 22:32:51 +02:00
  • 337ee19cef Correction of Server::Response::write eidheim 2017-06-22 22:23:07 +02:00
  • 6b7fd993cf Added convenience function Client::Response::Content::string() eidheim 2017-06-22 22:00:07 +02:00
  • 4efdc095bd Added convenience write functions to Server::response eidheim 2017-06-22 21:46:01 +02:00
  • d9faf1a6cb Added Status Code header eidheim 2017-06-22 18:02:10 +02:00
  • d553ca7a89 Cleanup of parse_query_string and fixed a potential segmentation fault eidheim 2017-06-22 14:44:55 +02:00
  • ba4eec7ebe Created Utility.hpp and moved some code into this file. Also improved parse_query_string. eidheim 2017-06-21 23:48:59 +02:00
  • 62da9daf87 Added Server::on_error and async client request examples eidheim 2017-06-20 14:36:05 +02:00
  • 1d34b7f3de Minor change in io_test.cpp eidheim 2017-06-19 12:37:50 +02:00
  • 52ff2787bd Removed use of boost::shared_mutex (in Client). Stopping request handlers, if needed, is now up to the user of the library. If io_service is running on multiple threads, a shared_mutex is needed, otherwise, regular mutex is adequate. eidheim 2017-06-18 10:42:24 +02:00
  • fae8e07faa Removed dependency of boost::string_ref if USE_STANDALONE_ASIO is defined eidheim 2017-06-18 08:11:27 +02:00
  • e1aebba344 Fixes #114: added support for async client requests. Also includes some cleanup, support for parallel requests, and client reconnect eidheim 2017-06-14 15:16:24 +02:00
  • f5ba673350 Further cleanup of Client eidheim 2017-06-12 11:52:37 +02:00
  • e2981c340b Cleanup of Client in preparation for async request eidheim 2017-06-12 10:53:22 +02:00
  • 2096017b24 Standalone asio correction in Client eidheim 2017-06-12 09:42:29 +02:00
  • 944c7fe370 Client::resolver is no longer a member variable eidheim 2017-06-12 08:32:27 +02:00
  • a0cd7520ba Made Client::create_request_header const, and cleanup of indentations in Client eidheim 2017-06-12 08:22:40 +02:00
  • 5baffbc3f1 Cleanup of Client::request in preparation for async requests eidheim 2017-06-12 08:14:34 +02:00
  • 45f84489bc Client::io_service is now shared_ptr eidheim 2017-06-12 07:57:10 +02:00
  • 83691c6e9a Fixes #129: linking issues related to case_insensitive_equal and make_error_code eidheim 2017-06-10 15:03:27 +02:00
  • e82ba25e3e Merge pull request #128 from eidheim/standalone_asio Ole Christian Eidheim 2017-06-10 12:15:35 +02:00
  • 111aeeb7fc Renamed case insensitive function and classes, and added test for case_insensitive_equal eidheim 2017-06-10 11:17:49 +02:00
  • cc15aac704 Added tests for case_insensitive_equals and case_insensitive_hash eidheim 2017-06-07 19:01:20 +02:00
  • ec63c4345e Cleanup of #127: using standalone asio. eidheim 2017-06-07 18:36:53 +02:00
  • 46536c394b Oups left tests in places, removed Sébastien Huss 2017-06-05 07:50:32 +02:00
  • d50bcabf8e added Support for NO_BOOST Sébastien Huss 2017-06-05 07:39:58 +02:00
  • 3f8fcc0c31 Removed unused lambda captures in examples eidheim 2017-06-02 07:34:44 +02:00
  • 7a1a23bf9c Fixes #126: unreachable code in http(s) examples eidheim 2017-05-30 19:05:20 +02:00
  • 4469de156b Fixed g++ error in Server::Request::parse_query_string eidheim 2017-05-27 09:44:00 +02:00
  • 550bbfe9d7 Finished query string parsing implementation (PR #109) eidheim 2017-05-27 09:07:13 +02:00
  • e68488a157 Merge branch 'master' of https://github.com/harella1/Simple-Web-Server eidheim 2017-05-26 11:36:41 +02:00
  • cfafbcbc7d Added support for request header Connection: keep-alive (see #123) Vladimir Venediktov 2017-05-06 09:05:37 +02:00
  • a859c42b41 Fix broken Markdown headings Santiago Castro 2017-04-18 00:47:03 -03:00
  • e585a7a5bc If query string is present then cut it from the reqeust path so find resource won't fail ProTrack 2017-02-27 10:13:33 +02:00
  • 6192c131ef Fixed #112: Client now supports Connection: close responses without Content-Length and Transfer-Encoding. Also supports HTTP 1.0 responses that does not specify content length eidheim 2017-02-24 19:12:15 +01:00
  • 50ce7510ef remove locale dependent stof() David Siroky 2017-02-14 10:16:44 +01:00
  • d554c13db5 Travis CI build failed ProTrack 2017-02-05 16:19:42 +02:00
  • a4dd2e6444 Added query string parsing and member to request ProTrack 2017-02-05 16:01:00 +02:00