Commit graph

86 commits

Author SHA1 Message Date
eidheim
18808121ed Added missing include 2019-06-23 12:46:21 +02:00
eidheim
b1d9476ff1 Client: added support for server-sent events, and improved the chunked transfer code. Also some cleanup of especially the client code, and added a few additional tests. 2019-06-23 12:41:32 +02:00
eidheim
45d39e3c18 Merge branch 'new_asio' of https://gitlab.com/eidheim/Simple-Web-Server 2019-06-14 20:14:56 +02:00
eidheim
1f699fc304 Related to #246 : added test where multiple clients sends posts concurrently to a server 2019-06-13 19:37:43 +02:00
eidheim
d6985ed62e Fixes #261: SimpleWeb::status_code(const std::string &) now only regards the status code number when searching for status code enum, and can also return undefined enums that can be cast to an integer value 2019-04-29 13:30:22 +02:00
eidheim
5087f5d3df Added support for new asio api 2019-04-10 11:07:33 +02:00
eidheim
ded57636dd Further improvements to the ASSERT-macro: replaced fprintf with std::cerr and added std::-prefix to abort 2019-03-28 10:56:16 +01:00
eidheim
e716cd9764 Improved ASSERT macro, and renamed tests/check.hpp to tests/assert.hpp 2019-03-23 13:46:31 +01:00
eidheim
7282a342b9 Merge branch 'tests_in_release' of https://gitlab.com/AndreyNautilus/Simple-Web-Server 2019-03-23 12:16:38 +01:00
Andrey Potapov
5db5031558 done 2019-02-13 16:29:27 +01:00
Andrey Potapov
4f66df49a0 use NAME and COMMAND tags in add_test function 2019-02-08 15:30:42 +00:00
eidheim
69b34bc7c2 Merge branch 'sse' of https://gitlab.com/eidheim/Simple-Web-Server 2018-07-10 12:46:53 +02:00
eidheim
8b75c14aef Fixes #231: added checks to getline calls in parse functions so that they can be used outside the Server/Client classes 2018-07-04 20:47:47 +02:00
Alex Fraser
6b91839cb6 Allow calling Response::send multiple times: copy the buffer before async_write 2018-06-03 12:10:18 +02:00
eidheim
fb4a17d5ed Fixes #203: header field values are now correctly parsed even with more than 1 space after : 2018-01-24 13:04:06 +01:00
eidheim
d0a0ca2941 Resolves #184: further fixes to Percent::encode 2018-01-03 18:38:39 +01:00
eidheim
bbbf350693 Fixes Percent::encode issue mentioned in #184 2018-01-03 18:11:23 +01:00
eidheim
c126eb76b9 Added chunked transfer tests 2017-11-19 18:03:28 +01:00
eidheim
ccce9d1fdf Added Request::remote_endpoint tests to io_test 2017-11-15 07:40:02 +01:00
eidheim
5a7c021dab Added MSVC support to cmake files (not tested, but hopefully it works). Some tests are disabled due to lacking MSVC options. 2017-11-14 19:44:40 +01:00
eidheim
2860f76139 HttpHeader::FieldValue::SemicolonSeparated renamed to HttpHeader::FieldValue::SemicolonSeparatedAttributes, and cleanup of HttpHeader::FieldValue::SemicolonSeparatedAttributes::parse, attribute values are now also percent-decoded 2017-11-08 11:30:21 +01:00
eidheim
f55eb4af65 Changed ContentDisposition::parse to HttpHeader::FieldValue::SemicolonSeparated::parse. This function can now also parse Set-Cookie header field values 2017-11-07 22:15:06 +01:00
eidheim
0d8caeca15 Modernised all CMakeLists.txt files, and made it easier to use Simple-Web-Server as a sub-project 2017-11-07 11:45:17 +01:00
eidheim
6e0a1ec9e8 Fixes issue mentioned in #164: remote endpoint address and port was not correctly set. Request::remote_endpoint_address and Request::remote_endpoint_port are now functions instead of variables in order to reduce unnecessary instructions. 2017-11-05 18:48:21 +01:00
eidheim
9cf3dd68ab Removed unnecessary: return 0; 2017-09-26 09:39:20 +02:00
eidheim
69f945f686 Fixes #155: added max streambuf config items to limit large requests/responses if needed 2017-09-25 09:58:50 +02:00
eidheim
9b3c1a0b89 Applied clang-format to status_code_test.cpp 2017-09-08 14:58:55 +02:00
knowledge4igor
6f9b8b7248 Add tests for status codes 2017-09-08 14:58:55 +02:00
knowledge4igor
3ab6cd8a39 Change 'typedef' constructions to type aliases 2017-09-05 01:32:21 +03:00
eidheim
a3d70bbcb5 Fixed HttpHeader::parse signature, and added ContentDisposition::parse 2017-09-04 15:55:26 +02:00
eidheim
7dd2d2108a Added noexcept 2017-07-22 12:50:40 +02:00
eidheim
3ba494e0ac Minor comment cleanup 2017-07-21 12:54:17 +02:00
eidheim
e3789b6d4d ScopeRunner::stop now returns if count is already negative 2017-07-20 18:32:35 +02:00
eidheim
474fab90f3 Renamed ScopesContinue to ScopeRunner, and some related cleanup 2017-07-20 17:21:19 +02:00
eidheim
8f5a644a2a Minor addition to ScopesContinue test 2017-07-20 11:53:19 +02:00
eidheim
70e8c3104c Renamed ContinueScopes to ScopesContinue 2017-07-20 11:31:58 +02:00
eidheim
35f835a67b Cancel handlers feature: replaced readers-writer lock with a spinlock implementation 2017-07-20 10:04:05 +02:00
eidheim
b89f5635a5 Moved request and response message parsing to utility.hpp 2017-07-19 08:03:23 +02:00
eidheim
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. 2017-07-15 08:45:06 +02:00
eidheim
c03e378e69 Comments addition and cleanup 2017-07-10 11:12:10 +02:00
eidheim
d8b8716a17 Session and Connection cleanup 2017-07-10 10:51:24 +02:00
eidheim
6c2c8d680b No longer stores pointer to Server/Client instance in Session objects. Some other cleanups as well. 2017-07-08 22:21:29 +02:00
eidheim
f3f527467f Now close connections when Server::stop is called 2017-07-08 11:47:05 +02:00
eidheim
490e33e2d1 Client::close renamed to Client::stop 2017-07-07 23:35:14 +02:00
eidheim
7d5599b8e5 Added Server::stop test 2017-07-07 22:23:39 +02:00
eidheim
06d3c701e1 Fixed io_test (out of stack?), also fixed concurrent sync requests count on request error. 2017-07-07 19:37:20 +02:00
eidheim
fd764d908c Synchronous client request calls is now safe to use concurrently 2017-07-07 17:16:53 +02:00
eidheim
9b5063f422 Replaced Server/Client::shared_from_this with asio callback checks if the Server/Client has been destroyed. Also added SharedMutex to utility.hpp. 2017-07-07 11:25:06 +02:00
eidheim
d9416c2566 Added Client::close, and Client::connections and Client::connections_mutex are no longer shared_ptrs 2017-07-04 23:25:30 +02:00
eidheim
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. 2017-07-04 12:04:07 +02:00