Commit Graph

1495 Commits

Author SHA1 Message Date
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
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