Commit Graph

1505 Commits

Author SHA1 Message Date
NitroMelon
6a55a3aa64
Fix namespace in model template. (#1107) 2021-12-05 18:29:29 +08:00
NitroMelon
e9fafc643d
Support CoroMapper method chaining (#1103) 2021-12-04 20:54:25 +08:00
SCOTT-HAMILTON
1c44cf7e4c
Handle SIGINT too (#1094)
Co-authored-by: an-tao <antao2002@gmail.com>
2021-12-02 10:42:21 +08:00
An Tao
3ad9326e2a
Fix a race condition when resetting ws (#1101) 2021-12-02 00:35:27 +08:00
Martin Chang
113d23494a
Fix CI to actually build in C++14 (#1100) 2021-12-01 21:55:38 +08:00
An Tao
7cf0a64ab6
Fix orm tests (#1099) 2021-12-01 11:18:35 +08:00
Martin Chang
8913abc400
Mark all awaiters as nodiscard (#1098) 2021-12-01 08:40:09 +08:00
An Tao
d6b09c9e1b
Fix an error when binding a function pointer to SqlBinder (#1097) 2021-12-01 08:39:42 +08:00
An Tao
f522d2d70e
Create path if it doesn't exist (#1095) 2021-11-29 18:15:18 +08:00
an-tao
bc18f56d57 Update trantor 2021-11-28 21:23:18 +08:00
An Tao
7d137362bd
Fix the error with multiple results when calling a procedure in mysql (#1091) 2021-11-28 16:26:23 +08:00
Martin Chang
6e6493299e
Support setting client certificate and SSL options on HTTP client (#1090) 2021-11-27 19:11:05 +08:00
Ichiro
faf3e0c17c
Add drogon::orm to models generation (#1092) 2021-11-26 11:29:47 +08:00
NitroMelon
ec8146774a
Add overloads for SqlBinder::operator<< with non-const ref parameter. (#1089) 2021-11-25 19:18:30 +08:00
An Tao
895552dcae
Export some symbols for Windows (#1088) 2021-11-24 23:59:00 +08:00
An Tao
df331c8a74
Add an example for using coroutines of redis clients (#1080) 2021-11-21 12:09:34 +08:00
L0ric0
953000e3fb
Fix compiler warnings (#1081)
* Fix narrowing conversion warning.

The `static_cast` does not change the behavior of the programm only explictly stating that the behavior is intended.
This change is needed as some compiler settings will treat this warning as an error.

* Do not redeclare `result` variable in insertFormattedString as it shadows variable in outer scope.

This fixes a compiler warning for shadowing variables declared in an outer scope. This change does not change the behaviour of the programm as the shadowd variable is not reused after the inner scope ends. Also the new version should represent the intention of the code better.
This change is needed as some compiler settings will treat this warning as an error.
2021-11-21 09:14:57 +08:00
Martin Chang
e4ec2c36c5
Fix build fail on CentOS8 (#1078) 2021-11-16 22:32:08 +08:00
Martin Chang
29f2d431ab
Prevent drogon_ctl create_view appending empty new lines to resulting view in c++ section (#1073) 2021-11-06 11:15:46 +08:00
Martin Chang
9e9bc7997e
use decay_t instead of remove_cvref_t (#1072) 2021-11-02 22:34:50 +08:00
Martin Chang
9448c19865
Fix coroutine objcet destructing before coroutine ends in async_run (#1069) 2021-11-02 13:56:18 +08:00
NitroMelon
0431f38a4e
Support range for static file (#1060) 2021-10-28 21:53:58 +08:00
Martin Chang
7066b09edb
fix deprcated warning when using openssl 3 (#1064) 2021-10-27 21:19:06 +08:00
Martin Chang
dff4b6c5d9
update trantor (#1059) 2021-10-26 10:07:53 +08:00
Martin Chang
e2eb674781
Fix Drogon not building caused by FindFilesystem (#1056)
* fix FindFilesystem not using the correct header for printf

* fix FS not found on Yocto
2021-10-21 19:43:53 +08:00
an-tao
5a03c9aa9f Bump version to 1.7.3 2021-10-17 11:49:20 +08:00
Neil Cook
a7f05c4214
Add option to disable brotli if desired by the builder (#1050) 2021-10-08 08:42:34 +08:00
everzone
0818384172
Add Alpine Dockerfile (#1048) 2021-10-04 23:26:09 +08:00
Martin Chang
ac4a816a99
Add async_run (#1047) 2021-10-03 16:31:52 +08:00
An Tao
4a6f298661
Update trantor (#1046) 2021-10-03 16:31:26 +08:00
An Tao
3eb5bcd1dd
Add the getOptionalParameter method (#1037) 2021-09-30 08:50:00 +08:00
An Tao
22f810a71b
Fix a race condition in testing (#1041) 2021-09-30 08:49:35 +08:00
iandrc
fdcf294ef9
fix(style): Change the NotFound page text color (#1038)
Key changes:
- Set the text color for 404 page to `"black"`

Refs:
- https://github.com/drogonframework/drogon/issues/977
2021-09-29 20:56:09 +08:00
Bertrand Darbon
9b09abe274
fix(cmake): error in FindFilesystem (#1035)
When building an application on Windows using Drogon as a dependency and with warnings treated as errors, the FindFilesystem.cmake generates this error (in CMakeError.log):

```
src.cxx(6): error C2220: the following warning is treated as an error
src.cxx(6): warning C4477: 'printf' : format string '%s' requires an argument of type 'char *', but variadic argument 1 has type 'const std::filesystem::path::value_type *'
src.cxx(6): note: consider using '%ls' in the format string
src.cxx(6): note: consider using '%lls' in the format string
src.cxx(6): note: consider using '%Ls' in the format string
src.cxx(6): note: consider using '%ws' in the format string
```

Documentation of std::filesystem::path: value_type: character type used by the native encoding of the filesystem: char on POSIX, wchar_t on Windows

Using generic_string() fixes this warning
2021-09-28 19:55:30 +08:00
Bertrand Darbon
c5effe9c51
fix(MutliPart): Does not respect quotes in Content-Disposition header (#1031)
* fix(MutliPart): Does not respect quotes in Content-Disposition header

Currently, Drogon MultiPart parser expects quotes for name and filename in the Content-Disposition header.

The builtin HTTP library for .NET Core (System.Net.Http.HttpClient) leaves the quotes in this header, which means that by default, .NET Core applications cannot upload files to drogon.

The related RFC https://datatracker.ietf.org/doc/html/rfc6266 allows for both usages.

This contribution aims to fix this and handle both cases (with or without quotes)
2021-09-26 08:51:13 +08:00
An Tao
8460249ab3
Update trantor (#1033) 2021-09-26 00:15:36 +08:00
an-tao
f49d71faba Modify FUNDING.yml 2021-09-25 11:10:16 +08:00
NitroMelon
c9f98e1bf3
Return on redis connection error. (#1030) 2021-09-25 00:03:23 +08:00
Martin Chang
56cb305ae3
Support custom MIME types and extensions (#1024)
* Drogon now support custom extension and MIME types
* Added contentTypeString() to retrieve the string version of content type (in case the content type is not in the ContentType enum)
* setCustomContentTypeAndString() also accepts MIME as input (instead of the full content-type header string),
* Remove webContentTypeToString()
* Added app().registerCustomExtensionMime()
* Added support to load custom extension from JSON config
2021-09-24 22:51:09 +08:00
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