Commit graph

150 commits

Author SHA1 Message Date
eidheim
f4ebb57420 Fixed dangling reference in Client::sync_request mentioned in https://gitlab.com/eidheim/Simple-Web-Server/-/merge_requests/248#note_291088756 2020-02-19 18:04:08 +01:00
eidheim
2b5ae3d0d1 Client: removed duplicate code 2020-02-19 11:58:54 +01:00
eidheim
c6c7d0a6f2 Related to !248: completed synchronous request() fixes 2020-02-19 10:45:05 +01:00
Jens Moeller
49e2bb9261 Support asynchronous requests with internal I/O context 2020-02-18 22:00:02 +00:00
Jens Moeller
571fe8b0ad Use futures in synchronous request() methods 2020-02-18 13:05:43 -06:00
eidheim
1bc0b9a779 Minor fix of streambuf size check in chunked transfer 2020-02-04 11:06:20 +01:00
eidheim
84455ac966 Cleanup of timeout handling: timeouts are no longer reset on partial reads and sends 2020-02-04 10:01:49 +01:00
eidheim
d96ed6f02c Cleanup of content max_size checks 2020-02-04 09:09:12 +01:00
eidheim
02bcd02891 Fixes #289: Client now also attempts to reconnect if writing request to server fails 2020-02-03 11:18:54 +01:00
eidheim
3be67623fa Client: async request handlers are now called multiple times if response content is larger than Config::max_response_streambuf_size. Also improved streambuf to streambuf copy, and streambuf to string copy. Finally, string() functions no longer consume streambuf. 2020-02-01 17:11:09 +01:00
eidheim
5544612a19 Cleanup of chunked transfer: now writes directly to request/response streambuf 2020-01-14 12:44:26 +01:00
eidheim
f59906cc90 Removed pop_back that could lead to undefined behaviour 2020-01-14 09:46:12 +01:00
eidheim
ed46b43fa7 Improved comments on public functions and variables as suggested in https://github.com/openjournals/joss-reviews/issues/1592#issuecomment-514946444 2019-07-26 09:28:20 +02:00
eidheim
6185e89e25 Fixes #270 : compilation error when using gcc4.8 2019-07-10 18:02:40 +02:00
eidheim
66b6be499d Client now supports event streams with \r\n line endings in addition to regular \n 2019-07-10 15:08:24 +02:00
eidheim
7c44f73ec5 Fixes #269 : Replaced ssize_t with std::streamsize 2019-07-03 20:28:58 +02:00
eidheim
fc43fc362d Cleanup of include guards 2019-06-25 11:56:21 +02:00
eidheim
a743915d72 Made use of clang's Thread Safety Analysis 2019-06-25 11:29:36 +02:00
eidheim
39fb720aa9 Minor fix of HeaderEndMatch 2019-06-25 08:50:40 +02:00
eidheim
d9d554b1b5 Client: added support for non-standard line endings in response status and header 2019-06-24 19:48:11 +02:00
eidheim
31e6819b42 Added SimpleWeb::error, and simplified request size checks on server 2019-06-23 20:27:54 +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
6097d86cb5 Another fix related to #246 : correctly removed connection from connections list when connection should be closed 2019-06-21 19:27:49 +02:00
eidheim
dbd2287418 Further fix of #246 : corrected use of response streambuf after reconnect (wrong response object was used in Session::callback). Also closes connection when appropriate, and simplified Session::callback. 2019-06-21 19:08:43 +02:00
eidheim
a316310815 Fixes #246 : client's response object is now reset when attempting to resend request on read error 2019-06-21 14:52:17 +02:00
eidheim
514a135e0c Improved set_timeout(): no longer keeps connection alive longer than necessary. 2019-05-27 21:13:28 +02:00
eidheim
1b5f062678 New asio: removed use of strand, and fixed steady_timer constructor call 2019-05-22 14:00:06 +02:00
eidheim
44c2f733dc New asio api: removed unnecessary SimpleWeb::timer_expires_after 2019-05-20 18:39:54 +02:00
eidheim
5087f5d3df Added support for new asio api 2019-04-10 11:07:33 +02:00
eidheim
c14705c62b Replaced unique_lock with lock_guard where possible 2019-03-08 12:54:56 +01:00
eidheim
b8de3ae504 Removed unnecessary check 2018-08-01 09:24:12 +02:00
eidheim
f39f21b56f Minor cleanups 2018-07-29 22:27:10 +02:00
eidheim
56b1df1ee5 Moved SimpleWeb::string_view to utility.hpp, and made use of string_view in Server::Response::write 2018-07-12 08:43:07 +02:00
eidheim
ebe170b4b3 Minor parameter rename, added underscore at end due to move 2018-07-10 17:42:48 +02:00
eidheim
c5cfa5b86c Added underscore on constructor parameters that are moved 2018-07-10 17:29:27 +02:00
eidheim
d59b7c234c Optimized string() functions 2018-06-02 20:21:52 +02:00
eidheim
f52c8a020b Cleanup of start and its related functions. Also removed unused lambda captures. 2018-05-05 10:05:11 +02:00
eidheim
bd9c1192bb Changed string view related __cplusplus check to > 201402L, and reverted additional travis tests to reduce the CI duration 2018-03-29 10:45:10 +02:00
Seth Hamilton
7bf465362a simplified ifdef 2018-03-26 10:27:23 -04:00
Seth Hamilton
1d7b24e13e removed superflous boost/string_ref include 2018-03-01 11:00:38 -05:00
Seth Hamilton
b1baa1f3e5 now with more define tests 2018-03-01 09:38:22 -05:00
Seth Hamilton
f1210436b8 now with more define tests 2018-03-01 09:29:36 -05:00
Seth Hamilton
5324abea8c c++17 string_view support 2018-02-27 09:52:27 -05:00
Seth Hamilton
1985c5941d support for C++17 string_view 2018-02-26 10:59:59 -05:00
eidheim
1056bd2e70 Now adds port to host request header field value only if the port is non-default 2018-02-14 12:47:58 +01:00
Sahin Habermann
760571083c Include Port in Host 2018-02-08 00:40:27 +01:00
eidheim
4f67773a25 Client can now send chunked transfer encoded content 2017-11-19 18:03:28 +01:00
eidheim
101a471ca9 Fixes #173: added server support for chunked transfer encoded requests 2017-11-19 18:03:28 +01:00
eidheim
6d1577ecaa chunked transfer encoding cleanup 2017-11-18 09:55:24 +01:00
eidheim
5fc5308a8b Fixes #174: variable length no longer uninitialized 2017-11-18 07:44:26 +01:00