Tibbel
5b880cef49
Add a catch-all handler 2nd version
...
Here is the modified catchall-function
example added
the code moved to routing.h
only the setter remained in app.h
the integer return is removed
i personally don't need the default parameters:
without crow::response the catchall can take no effect
and without crow::request you know nothing about the request
i only imagine one case, this is to set custom error pages.
so i don't thing default parameters have any big benefit here.
"#ifdef CROW_CATCHALL" was only for me, to find my own modifications feel free to replace it
2021-04-05 09:44:35 +02:00
The-EDev
b837877715
updated head and no_length variable names
2021-04-03 13:48:36 +03:00
The-EDev
5f68479ee5
fixed small merge issue
2021-04-03 06:40:14 +03:00
Farook Al-Sammarraie
1654acbfd0
Merge branch 'master' into HEAD_and_OPTIONS
2021-04-03 06:31:45 +03:00
The-EDev
33e8631676
Added Content-Length header back to HEAD response.
...
The reason for removing it was an issue with Curl rather than how HEAD should be handled.
2021-04-03 06:21:18 +03:00
The-EDev
ec566f87ef
added tests and fixed small issues
...
moved body handling to Response.end() and fixed a bug where a 404 was not returned on a route that doesn't exist
2021-04-03 06:00:23 +03:00
The-EDev
06226b86a7
implemented proper HEAD handling, implemented OPTIONS handling
2021-04-03 05:33:40 +03:00
Farook Al-Sammarraie
b826e9c228
Merge branch 'master' into sfinktah-64bit-compat-1
2021-04-02 03:36:09 +03:00
Maxim Kokryashkin
cdce8f443a
macro rename
2021-03-31 20:30:32 +03:00
Maxim Kokryashkin
a4ec6d06ce
delete tags
2021-03-13 15:06:35 +03:00
The-EDev
6f5514743a
added automatic HEAD method handling
2021-03-13 13:51:27 +03:00
Sfinktah Bungholio
21f6f11484
Merge branch 'master' of https://github.com/CrowCpp/crow into sfinktah-64bit-compat-1
2021-02-21 11:14:52 +11:00
Sfinktah Bungholio
6597feb3a8
converted all (int) to static_cast
2021-02-21 11:14:30 +11:00
Maxim Kokryashkin
ce7d08eb0e
fixed issues with static wariables
2021-02-21 00:28:32 +03:00
rittelle
3b151d569d
Properly clear responses
...
Closes #104 .
2021-02-12 13:21:59 +01:00
Farook Al-Sammarraie
e15b50ed29
Merge branch 'master' into sfinktah-msvc17-compat-1
2021-02-12 01:43:56 +03:00
Sfinktah Bungholio
b2cf780485
recast 64-bit size_t to 32-bit int to remove warnings
2021-02-10 21:03:21 +11:00
The-EDev
8523afa930
Update templating.md and mustache.h
...
Updated templating documentation to mention "working directory" rather than "executable directory".
Added Warning log when a template is not found.
2021-02-09 06:52:05 +03:00
sfinktah
02f664c340
Update common.h
...
oops, had to remove #undef DELETE -- used to enable refactoring without MS DELETE macro getting in the way.
2021-02-09 03:29:07 +11:00
Sfinktah Bungholio
740bd266e7
fixes for **some** msvc compatibility issues
2021-02-09 03:25:02 +11:00
The-EDev
747ad6db72
Merge branch 'master'
2021-01-21 21:37:55 +03:00
The-EDev
3aaef5e0fd
fixed merge errors
2021-01-21 21:36:41 +03:00
The-EDev
78ee97124b
Merge branch 'master'
...
Conflicts:
CMakeLists.txt
examples/CMakeLists.txt
include/crow/http_connection.h
tests/CMakeLists.txt
2021-01-21 06:56:02 +03:00
The-EDev
3234c924cf
disable compression on static files
2021-01-21 06:46:54 +03:00
The-EDev
b72ee2a4e8
Added virtual destructor to fix clang compilation
2021-01-15 03:45:57 +03:00
The-EDev
cf217d3c1f
Merge branch 'master'
2021-01-05 17:51:57 +03:00
The-EDev
33f1206571
made json a returnable type and removed json specific code
2021-01-05 17:49:10 +03:00
The-EDev
24fc57d453
location != ""
-> !location.empty()
2021-01-03 17:56:19 +03:00
The-EDev
09d0f4ccdd
Added HTTP compression using gzip or deflate (disabled by default, requires calling method)
2021-01-02 22:12:04 +03:00
The-EDev
97dea47eb0
Changed the behaviour of redirect
function to redirect to a route if no http://
is available
...
Also added `redirect_perm`, `moved`, and `moved_perm` functions with their status codes.
And corrected the description of the `raw_url` member.
2020-12-26 19:54:41 +03:00
Nick Rizzo
3945251869
[fix] Make signal handler optional
2020-12-19 14:05:27 -05:00
The-EDev
9db47120e7
added documentation
...
also removed extra header meant for testing
2020-12-19 14:30:20 +03:00
The-EDev
ed2a7ae0e0
Added returnables class and applied to multipart
...
did not apply to JSON because it caused a linker error
also changed the version of boost required in CMAKE
2020-12-18 12:28:37 +03:00
Ayaan Khan
716aa046fc
Merge branch 'master' into master
2020-12-03 12:46:57 +05:30
Makaveli
9bc030478f
Settable server name feature
2020-12-02 20:15:05 -05:00
ayaankhan98
ec29121c22
fix clang build
2020-12-02 22:59:45 +05:30
ayaankhan98
fcce57d232
revert: new handler_ changes
2020-12-02 16:37:43 +05:30
ayaankhan98
770359e79f
fix: ambigous call and example
2020-12-02 15:36:29 +05:30
ayaankhan98
737a3384ae
removed extra changes
2020-12-01 14:39:11 +05:30
ayaankhan98
6f31e597a0
Merge branch 'master' of https://github.com/ayaankhan98/crow
2020-12-01 12:36:09 +05:30
ayaankhan98
acab73ef68
removed extra req arg
2020-12-01 12:35:46 +05:30
Ayaan Khan
6c7bef1eda
Merge branch 'master' into master
2020-12-01 12:03:02 +05:30
ayaankhan98
a7c74c6327
recieve response without request being another argument in handle
2020-12-01 11:50:46 +05:30
The-EDev
3d202d2919
allow returning all json data types, not just json objects
2020-11-26 04:08:24 +03:00
The-EDev
2422f55855
documented as much as possible relating to the API reference
2020-11-19 01:13:57 +03:00
The-EDev
454810c165
Added reference docs for dumb_timer_queue, http_request, http_response, and socket_adaptors
2020-11-14 05:28:07 +03:00
Farook Al-Sammarraie
f9dec6997e
Merge branch 'master' into static_file_win32
2020-11-13 15:24:44 +03:00
Eero Pajarre
71bd6c8c2b
removed another if not defined(_WIN32)
2020-11-13 07:42:02 +02:00
Eero Pajarre
16cae0af4a
Activate static_file support on WIN32
...
static_file support seems to work, at least with
Microsoft Visual Studio 2017 and 2109 / C++17.
Without it the compilation fails, so activating it.
2020-11-12 15:38:37 +02:00
Eero Pajarre
5fe3a45793
Replaced uint with unsigned
...
uint is not a default type in C++.
Replaced it with unsigned, which should be large enough
2020-11-12 15:11:22 +02:00