Commit Graph

1466 Commits

Author SHA1 Message Date
Martin Chang
c7b6c8403f
allow outside access to the file path of a HTTP response (#1020) 2021-09-17 13:14:23 +08:00
An Tao
94c7add7a1
Fix a bug in the getIOLoop method (#1014) 2021-09-07 21:42:08 +08:00
an-tao
cdabca9de5 Update trantor 2021-09-04 23:30:16 +08:00
NitroMelon
ba5187868d
Improve AccessLogger. (#1008) 2021-09-02 08:20:49 +08:00
Martin Chang
6b0e38fc8f
Experimental HaikuOS Support (#1002) 2021-08-28 11:47:24 +08:00
an-tao
30f06515fe Update trantor 2021-08-26 23:38:35 +08:00
NitroMelon
b2bf247048
Support sending files by range (#1001) 2021-08-26 23:33:58 +08:00
marty1885
b68aeb43ae add v1.7.2 link 2021-08-24 20:08:33 +08:00
marty1885
3620228843 Bump version to 1.7.2 2021-08-24 19:43:00 +08:00
Martin Chang
133e6dc2ef
Update C++ version detection logic (#993)
* Maintain compatibility with cmake generated from older drogon_ctl
 * Use user-defined C++ version when possible
 * C++ version detection no-longer depends on std::filesystem availability
 * Link against c++fs in DrogonConfig.cmake if on those versions of GCC
 * Allow DrogonConfig to use user-defined C++ version
2021-08-24 16:34:07 +08:00
tastytea
588a7f0cd1
cmake: Use GNUInstallDirs to figure out install dirs. (#980) 2021-08-22 19:31:47 +08:00
an-tao
8049206b5f Update trantor 2021-08-18 22:45:25 +08:00
tastytea
0783d6aa3e
CMake: Add CPack for .deb and .rpm package generation. (#987)
Compile as normal, run `cpack -G DEB` or `cpack -G RPM` in build
directory.

Tested on:
  - Debian 11 (bullseye)
  - OpenSUSE Leap 15
  - Ubuntu 18.04 (bionic)

Bug: https://github.com/drogonframework/drogon/issues/983
2021-08-18 22:31:32 +08:00
An Tao
d60f962aa3
Add stop() method to the WebSocketClient class (#972)
* Fix memory leak in the WebSocketClient class

Co-authored-by: marty1885 <marty188586@gmail.com>
2021-08-15 18:17:05 +08:00
Martin Chang
1551b66307
Add missing websocket_server entry in examples/README.md (#974) 2021-08-13 23:00:59 +08:00
Martin Chang
7e4174d537
Escape connection string in drogon_ctl create model (#967) 2021-08-10 21:25:16 +08:00
Martin Chang
b1bdc747c4
Force using boost::filesystem when building for Android (#964)
Co-authored-by: Rafał Bugajewski <rb@cocobit.software>
2021-08-09 22:37:23 +08:00
Martin Chang
477c3dca7d
Fix test success message incorrectly shown when -s is flag present (#962) 2021-08-07 23:07:48 +08:00
Martin Chang
88236f9279
Add port() and host() to HttpClient (#959) 2021-08-05 23:10:05 +08:00
Martin Chang
6427fdedcc
Add websocket server example (#957) 2021-08-04 12:48:42 +08:00
an-tao
f46e3baeb1 Update trantor 2021-07-31 22:46:43 +08:00
Martin Chang
0b9d114746
Fix Failing to Build on MSYS2 (#952) 2021-07-27 10:53:04 +08:00
An Tao
da87c124ae
Use HAS_STD_FILESYSTEM_PATH in filesystem.h (#950) 2021-07-25 23:17:32 +08:00
putao520
64f9f8b87f
Fix a md5 sum bug without openssl (#951) 2021-07-25 23:16:13 +08:00
An Tao
1c04b1a419
Fix some compatibility issues introduced by std::filesystem or boost::filesystem (#947) 2021-07-23 13:08:54 +08:00
An Tao
895ab63937
Fix a link error when the version of gcc < 9 (#946) 2021-07-22 21:25:25 +08:00
Martin Chang
25cba9a2a5
Add missing include (#942) 2021-07-21 00:18:31 +08:00
an-tao
629ae0bba1 Update trantor 2021-07-18 13:37:16 +08:00
Greisberger Christophe
dbfb99ccc8
Add BUILD_DOC to cmake options (#936)
Co-authored-by: Christophe Greisberger <christophe@greisberger.fr>
2021-07-18 13:36:13 +08:00
Martin Chang
35c2d123c0
Load ParseAndAddDrogonTests in DrogonConfig (#934) 2021-07-17 22:16:03 +08:00
An Tao
991873cf60
Correctly check the case-insensitive value of the upgrade header of responses in websocket connections (#935) 2021-07-16 17:03:00 +08:00
Martin Chang
c9035962fc
Remove AppVeyor badge (#933) 2021-07-16 09:15:15 +08:00
Greisberger Christophe
5c1c81e828
Feature/support windows unicode paths (#928) 2021-07-15 23:57:12 +08:00
Nereg
5e8db234b9
Fix missing make (#931)
Fixed https://github.com/an-tao/drogon/issues/930
2021-07-15 00:45:02 +08:00
Greisberger Christophe
d888816997
Added support for paths containing unicode characters on Windows (#921)
Co-authored-by: Christophe Greisberger <christophe@greisberger.fr>
Co-authored-by: an-tao <antao2002@gmail.com>
Co-authored-by: marty1885 <marty188586@gmail.com>
2021-07-12 22:38:02 +08:00
Martin Chang
f87a6ca1b8
Disable strict compiler check on Windows with GCC (#927) 2021-07-11 12:29:37 +08:00
Martin Chang
3b600232be
error on failing to create view from CSP (#924) 2021-07-09 07:58:03 +08:00
Sebastián González
a02d8e402c
Add Redis example (#918) 2021-07-06 23:02:11 +08:00
PColis
c5398b26cb
Update CacheFile.cc (#916)
On Windows, ftell returns a 32 bits signed integer.
On Windows we had to use _ftelli64 to return a signed 64 bits integer.
2021-07-02 19:08:28 +08:00
Martin Chang
0efd0c34c1
Generic optimizations (#913) 2021-06-30 23:37:59 +08:00
James Armes
5245f136b7
Add GCC-compatible warnings to the example executables (#910) 2021-06-27 09:54:02 +08:00
Martin Chang
0e7637daf6
Fix clang-format 12 putting {} of a lambda body on the next line (#905) 2021-06-25 23:59:09 +08:00
Martin Chang
04c7c7eb22
Fix WS client example not working with integration_test_server and print error when WS encounters bad IP address (#902) 2021-06-24 23:29:50 +08:00
an-tao
dbb51c1e6a Bump version to 1.7.1 2021-06-24 14:48:38 +08:00
Martin Chang
b8d820fc2a
Fix single layer directory traversal in StaticFileRouter (#901)
The StaticFileRouter can access file in the immediate parent directory if the
client sends a specially crafted, non RFC conforming HTTP 1.x request. By
sending a HTTP request without a "/" predicating the path. The StaticFileRouter
fails to detect directory traversal since it checks for "/../" in the path.

This PR fixes the issue by detecting if there's potential for directory
traversal. If true, we follow the path and detect if it reaches out of the
document root at any point. Also added 2 new tests for edge cases in static
file serving. (Not related to the bug).

Co-authored-by: an-tao <antao2002@gmail.com>
Bug discovered by: oToToT <https://github.com/oToToT>
2021-06-24 13:04:19 +08:00
QuickWrite
065675486d
Fixed typos (#900)
Just some typos were fixed and nothing more. (Nothing significant)

What has changed:

* Some rewording and corrections

* Updated the requested changes

Co-Authored-By: Rafał Bugajewski <24480+rbugajewski@users.noreply.github.com>

* clang-format

Co-authored-by: Rafał Bugajewski <24480+rbugajewski@users.noreply.github.com>
Co-authored-by: an-tao <antao2002@gmail.com>
2021-06-23 20:44:45 +02:00
Martin Chang
6a882841f1
Fix typos (#899) 2021-06-22 15:08:06 +08:00
Martin Chang
cd46b4a488
Add jsonstore example (#894)
Adds a minimal useful RESTful API example to showcase how to build APIs in Drogon. The added example is multi-threaded and stores data in memory.
2021-06-19 22:55:44 +08:00
Rafał Bugajewski
f84b709a61
Updated Dockerfile to Ubuntu 20.04 & Fixed Timezone Hangup (#895)
Co-authored-by: an-tao <antao2002@gmail.com>
Co-authored-by: Martin Chang <marty1885@users.noreply.github.com>
2021-06-19 17:37:42 +08:00
an-tao
a38d67aedb Bump version to 1.7.0 2021-06-18 16:07:18 +08:00