Commit graph

43 commits

Author SHA1 Message Date
eidheim
83788f3885 Added SimpleWeb::Date::to_string to create HTTP date strings 2019-07-31 15:23:50 +02:00
eidheim
5087f5d3df Added support for new asio api 2019-04-10 11:07:33 +02:00
eidheim
e716cd9764 Improved ASSERT macro, and renamed tests/check.hpp to tests/assert.hpp 2019-03-23 13:46:31 +01:00
Andrey Potapov
5db5031558 done 2019-02-13 16:29:27 +01: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
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
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
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
69f945f686 Fixes #155: added max streambuf config items to limit large requests/responses if needed 2017-09-25 09:58:50 +02: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
b89f5635a5 Moved request and response message parsing to utility.hpp 2017-07-19 08:03:23 +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
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
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
eidheim
0662cbdfb7 Added timeout to Server::Response::send, and some cleanup 2017-07-04 11:21:31 +02:00
eidheim
30f4f94a03 ServerBase now derives from and use std::enable_shared_from_this 2017-07-03 18:00:49 +02:00
eidheim
026f47f195 ClientBase now derives from and use std::enable_shared_from_this 2017-07-03 18:00:24 +02:00
eidheim
1992bbb4b4 Preparation for std::enable_shared_from_this: Server- and Client-constructors are no longer public, use ::create instead 2017-07-03 15:02:35 +02:00
eidheim
0c9cb000b4 Server::Request::path is split into path and query_string 2017-07-03 14:25:48 +02:00
eidheim
e50d2fc63a Added .clang-format file and applied style to source files 2017-06-26 15:23:29 +02:00
eidheim
98d9617244 Added QueryString class with create and parse functions to utility.hpp 2017-06-25 16:43:49 +02:00
eidheim
1d9e900f44 Added Percent::encode 2017-06-25 14:32:38 +02:00
eidheim
ba4eec7ebe Created Utility.hpp and moved some code into this file. Also improved parse_query_string. 2017-06-22 12:08:56 +02:00
eidheim
e1aebba344 Fixes #114: added support for async client requests. Also includes some cleanup, support for parallel requests, and client reconnect 2017-06-17 11:52:13 +02:00
eidheim
111aeeb7fc Renamed case insensitive function and classes, and added test for case_insensitive_equal 2017-06-10 11:17:49 +02:00
eidheim
cc15aac704 Added tests for case_insensitive_equals and case_insensitive_hash 2017-06-07 19:28:21 +02:00
eidheim
ec63c4345e Cleanup of #127: using standalone asio. 2017-06-07 19:27:34 +02:00
eidheim
550bbfe9d7 Finished query string parsing implementation (PR #109) 2017-05-27 09:07:13 +02:00
eidheim
549bc646bb Case insensitive header cleanup. Also cleanup and additions to parse_test 2016-12-31 10:34:03 +01:00
eidheim
6c3a59d9ba Cleanup of server-constructors. Previous constructors have been marked as deprecated. 2016-12-29 09:53:58 +01:00
eidheim
eef8a10849 Added error reporting through on_error std::function 2016-12-19 08:44:41 +01:00
eidheim
ddb5622f76 Fixed request path when using proxy with HTTPS client 2016-11-26 10:33:11 +01:00
eidheim
599775c83f Made protocol() const, added default proxy ports, and added handshake on https proxy (based on #83) 2016-11-25 12:44:59 +01:00
eidheim
9d9a8622d5 Added proxy server support to Client. Based on #83 2016-11-24 14:07:11 +01:00
eidheim
0d8052dcb9 Simplified Server::parse_request 2016-11-23 09:54:22 +01:00
eidheim
2f32a2b52f Client now uses asynchronous asio read/write calls 2016-11-23 06:01:39 +01:00
eidheim
d6f3d55019 Renamed test folder to tests 2016-08-03 12:15:32 +02:00
Renamed from test/parse_test.cpp (Browse further)