This adds:
Various lesser-used HTTP status codes to the HttpStatusCode enumeration.
Getter and setter for customErrorHandler, which is a function that generates a HttpResponsePtr given an HttpStatusCode. This is intended to be similar to the custom404 functionality, allowing a user to override the layout of the error page.
The custom404 functions were kept even though this supersedes that to avoid breaking current code.
Finally, all of the Routers were updated to use the error handler for their 405/403 responses.
If no custom error handler is set, a default is used. The default behavior is identical to what exists now, an empty body with the status code set.
* Standardize Row and Result api, throw specific exceptions
* Fix drogon_ctl for sqlite3 models
* Add mysql and sqlite3 tests, add exception throwing tests
* configure mysql in travis-ci
Co-authored-by: antao <antao2002@gmail.com>
Use ninja to build if found on system (in /bin/ninja)
Make make simulate ninja's default parallelism
Should help with travis_ci as default build environments have 2 cores.
Add getHomePage to HttpAppFramework to help with SPA in scenarios a controller must take a certain action on passed parameters but redirect to homepage
This change greatly reduces the time between multiple Drogon runs
while developing an application with the framework. Previously on a
relaunch the framework naively compiled all *.csp files if dynamic
view loading was turned on. Now there will be a check for modification
time and the compilation phase will only run if the
corresponding *.csp file is newer than the dynamic library.
Co-authored-by: Rafał Bugajewski <rb@cocobit.software>
The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.
https://linux.die.net/man/3/timelocal