Commit Graph

51 Commits

Author SHA1 Message Date
The-EDev
db08b5a11d further simplified BP search code & made error_message const 2021-08-21 14:35:59 +03:00
The-EDev
576690bf14 Made catchall work with 404 or 405 errors
snuck in a fix for release.py where version name wouldn't change
also snuck in slight improvement in finding blueprint (removed extra if statement)
2021-08-21 04:49:17 +03:00
Farook Al-Sammarraie
62af482f7b
Merge branch 'master' into patch-1 2021-08-07 03:24:26 +03:00
Dan Kersten
e6b36c3c03 Eliminate extern-initializer warning 2021-08-06 22:28:13 +01:00
Mustafa Mahmoud
d5c1b54918
Replace HTTPMethod::GET with HTTPMethod::Get 2021-08-06 19:01:13 +02:00
The-EDev
0588471d6d fixed extern constexpr problem 2021-08-05 19:53:52 +03:00
The-EDev
1474fbec33 used constant 0xffff in more places, used .empty(), and split the if statement into a method. 2021-08-04 23:58:38 +03:00
The-EDev
2def62bd4a removed unnecessary code / added constexpr for max bp id 2021-08-03 12:46:41 +03:00
The-EDev
addcce9e93 small fixes, optimizations, and documentation 2021-07-30 13:09:01 +03:00
The-EDev
e713ad54cb added unit test, moved macros to app.h, and fixed bug where "bp_prefix2" would be considered a child of "bp_prefix" even if it's not 2021-07-28 22:31:08 +03:00
The-EDev
06c4829ca7 implemented all blueprint features 2021-07-27 10:52:49 +03:00
The-EDev
27fe952a0c Merge branch 'master' 2021-07-20 11:00:09 +03:00
The-EDev
6d6fbe2385 removed unnecessary boolean 2021-07-19 00:01:20 +03:00
The-EDev
32d88725bd used CROW_LOG_DEBUG instead of std::cout (which was used to rapidly test the trie outside crow) 2021-07-10 23:14:38 +03:00
The-EDev
341a9b7fbe Re-implemented Trie 2021-07-10 22:45:47 +03:00
The-EDev
ea597d804a blueprint specific templates directory now supported 2021-07-07 15:51:04 +03:00
The-EDev
85e4525d67 added custom static directory capability to blueprints (the endpoint remains "<prefix>/static/<filename>") 2021-07-06 01:53:32 +03:00
The-EDev
c46af69f41 Added basic blueprint support (registration and prefix) 2021-07-05 12:14:31 +03:00
Darius Tan
3bd1956e90 Change HTTPMethod::HEAD to HTTPMethod::Head, HTTPMethod::GET to
HTTPMethod::Get and HTTPMethod::OPTIONS to HTTPMethod::Options.

VS2019 error:
enum "crow::HTTPMethod" has no member "HEAD"
enum "crow::HTTPMethod" has no member "GET"
enum "crow::HTTPMethod" has no member "OPTIONS"

See https://github.com/ipkn/crow/pull/307 for a similar issue.
2021-05-23 19:58:01 +12:00
The-EDev
5b7b066c68 fixed typo and incorrect type in assert error 2021-04-14 04:55:27 +03:00
The-EDev
16ae11a4e3 updated catchall to use references instead of pointers 2021-04-12 10:41:55 +03:00
The-EDev
f779a0f8a4 changed catchall to fit with the rest of crow
the macro is similar to CROW_ROUTE, added example to cmake, added unit test, and documentation
2021-04-12 08:25:09 +03:00
Tibbel
97ef2945ed
CROW_CATCHALL #endif if moved
CROW_CATCHALL #endif if moved
2021-04-05 10:14:38 +02:00
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
The-EDev
6f5514743a added automatic HEAD method handling 2021-03-13 13:51:27 +03:00
Sfinktah Bungholio
6597feb3a8 converted all (int) to static_cast 2021-02-21 11:14:30 +11: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
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
2422f55855 documented as much as possible relating to the API reference 2020-11-19 01:13:57 +03:00
The-EDev
823d061c62 Removed unnecessary variables 2020-10-15 13:59:15 +03:00
The-EDev
4e5d43696b code formatting
Removed extra spaces
2020-10-15 00:09:35 +03:00
The-EDev
dc46f2848a added 405 error for when a rule is found but the method is incorrect 2020-10-15 00:09:17 +03:00
Farook
3f38caa0d0 stole @digitalist's sendFile code and made it work with newer boost 2020-10-04 15:05:26 +03:00
ipknHama
b7360a2bac Support multiple methods for same URL
- fix broken unittests because of server initializing order change
 - add a function to wait until server is up
2017-12-25 15:31:20 +09:00
Jaeseung Ha
f0cb83df88 Merge pull request #210 from zxmarcos/master
Add onaccept handler to websocket rule
2017-09-17 14:17:46 +09:00
Jaeseung Ha
cf67a40e4c Merge pull request #212 from uctakeoff/fix_warning_in_cpp11
Fixed a problem that warning appeared in c ++ 11
2017-09-17 14:10:07 +09:00
ushiyake
bd2dd4a8e4 Fixed a problem that warning appeared in c ++ 11 2017-01-09 21:24:01 +09:00
Marcos Medeiros
bea1ba3797 Add onaccept handler to websocket rule 2016-12-28 11:06:56 -02:00
Vsevolod Kvachev
32d66d6fd1 Upgrade amalgamate 2016-12-06 18:22:10 +03:00