- 26 Nov, 2019 4 commits
-
-
Dennis Jenkins authored
optional::operator== improvements
-
Krystian Kuzniarek authored
-
Krystian Kuzniarek authored
-
Krystian Kuzniarek authored
-
- 22 Nov, 2019 5 commits
-
-
Dennis Jenkins authored
optional: add equal_to and not_equal_to operators
-
Mateusz Szychowski (Muttley) authored
-
Mateusz Szychowski (Muttley) authored
these will be generated only if T supports these operators
-
Krystian Kuzniarek authored
-
Mateusz Szychowski (Muttley) authored
-
- 13 Nov, 2019 2 commits
-
-
Dennis Jenkins authored
add JSON schema MIME types
-
Glenn Skinner authored
https://json-schema.org/latest/json-schema-core.html#rfc.section.13 (more precisely, draft-handrews-json-schema-02 of that document) defines two new MIME subtypes that descibe JSON schema documents and instances of JSON schema documents. This patch adds them to mime.h.
-
- 11 Nov, 2019 3 commits
-
-
Dennis Jenkins authored
Fix for segmentation fault caused by incorrect lambda capture in promise
-
Dimitrios Katsaros authored
The lambda was capturing the entire object being passed, rather then only the needed resource. On edge cases where the captured object would fall out of scope (deallocated) before the promise completion, it would try to use deallocated members, which would cause a segmentation fault.
-
Dimitrios Katsaros authored
There is a race condition where a connection being serviced can hang up before a write operation is performed. In these cases, the transport will issue an error response to the disconnected peer, which invokes a promise to handle the request. The object is destroyed and then the promise is resolved on the destroyed response object, causing a segmentation fault
-
- 01 Nov, 2019 3 commits
-
-
Dennis Jenkins authored
Added overload for ResponseWriter::send for raw byte stream...
-
Kip Warner authored
Removed std::byte usage from ResponseWriter::send() since requires C++17 which we're not ready for yet...
-
Kip Warner authored
-
- 29 Oct, 2019 4 commits
-
-
Dennis Jenkins authored
Allow IPv6 addresses without port number. Fixes oktal/pistache#625
-
Stefan Winkler authored
-
Dennis Jenkins authored
Raw and Cookie header case-insensitive
-
Adam Burgess authored
-
- 28 Oct, 2019 4 commits
-
-
Adam Burgess authored
-
Adam Burgess authored
Both strings were copied and converted to lowercase before, wasting memory. Now they are compared directly.
-
Adam Burgess authored
-
Stefan Winkler authored
-
- 18 Oct, 2019 6 commits
-
-
Dennis Jenkins authored
Common: Fix broken compilation for trees without the PISTACHE_USE_SSL option
-
Dennis Jenkins authored
Added basic_tls_request_with_servefile unit test to try and reproduce…
-
Louis Solofrizzo authored
Due to a brain-lag on my end, I've introduced a regression in commit 44e40478, because a SSL utility function was compiling whether or not the SSL was enabled. It is now fixed, apologies. Pull Request: https://github.com/oktal/pistache/pull/623 Fixes: https://github.com/oktal/pistache/issues/621 Fixes: https://github.com/oktal/pistache/issues/622 Fork: https://git.mobley.ne02ptzero.me/~louis/pistacheSigned-off-by:
Louis Solofrizzo <lsolofrizzo@online.net>
-
Kip Warner authored
-
Kip Warner authored
-
Dennis Jenkins authored
Transport: Fix static file serving from SSL connections
-
- 17 Oct, 2019 1 commit
-
-
Louis Solofrizzo authored
This patch fixes the behavior of serveFile with SSL enabled servers. Before, the sendfile(2) syscall was used, but cannot work if our current version of OpenSSL, because the transfer happens kernel-side, and the SSL encryption does not. So I've implemented a _very_ basic sendfile utility for SSL connections, which only stream 4096 bytes of the file per call, in order not to block the whole pipeline. It's worth noting that this patch will be useless when the upstream moves to OpenSSL 3.0, which uses Kernel TLS, and implement a zero-copy version of SSL_sendfile, which is far more superior than the one implemented in this patch. I've tested the basic use cases with this patch, whis is file downloading. I've used small and big (45G) files, and it appears to be working. I've launched kip's tests[1] on my code, and it seems to be passing everything: Start 25: https_server_test 25/25 Test #25: https_server_test ................ Passed 0.07 sec [1] https://github.com/kiplingw/pistache/tree/kip-ssl-servefile-test Here is my example file: #include <pistache/endpoint.h> #include <iostream> using namespace Pistache; struct HelloHandler : public Http::Handler { HTTP_PROTOTYPE(HelloHandler) void onRequest(const Http::Request& request, Http::ResponseWriter writer) { Http::serveFile(writer, "main.cpp"); } }; int main(void) { std::cout << "Starting server\n"; Pistache::Address addr; auto opts = Http::Endpoint::options().threads(5); addr = Pistache::Address(Pistache::Ipv4::any(), Pistache::Port(9999)); Http::Endpoint server(addr); server.init(opts); server.setHandler(std::make_shared<HelloHandler>()); server.useSSL("./cas/server/server.crt", "./cas/server/server.key", true); std::cout << "SSL enabled\n"; server.serve(); return 0; } $> curl https://localhost:9999 -k > test % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 770 100 770 0 0 30800 0 --:--:-- --:--:-- --:--:-- 30800 $> diff test main.cpp $> Pull Request: https://github.com/oktal/pistache/pull/620 Fork: https://git.mobley.ne02ptzero.me/~louis/pistacheSigned-off-by:
Louis Solofrizzo <lsolofrizzo@online.net>
-
- 16 Oct, 2019 2 commits
-
-
Kip Warner authored
Moved basic_tls_request_with_servefile to the end of https_server_test.cc to preserve existing port ordinals...
-
Kip Warner authored
-
- 15 Oct, 2019 3 commits
-
-
Kip Warner authored
-
Dennis Jenkins authored
Add support router HEAD request
-
jaywheelT authored
-
- 08 Oct, 2019 2 commits
-
-
Dennis Jenkins authored
Added Authorization Header
-
Marcin Romanowski authored
-
- 26 Sep, 2019 1 commit
-
-
Dennis Jenkins authored
Fix access beyond passed buffer when constructing RawBuffer
-