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
321f9c7fe6
Merge branch 'master'
2021-07-06 01:51:50 +03:00
The-EDev
165c72f56c
fixed issue where disabling crow static directory would also disable all other routes
2021-07-05 12:18:00 +03:00
The-EDev
c46af69f41
Added basic blueprint support (registration and prefix)
2021-07-05 12:14:31 +03:00
Luca Schlecker
0593f42522
http_response: fix move assign operator not moving file_info.
...
Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
2021-06-28 18:08:57 +02:00
The-EDev
fc27f73f84
Bump server version to 0.3
2021-06-05 06:30:01 +03:00
The-EDev
ca31b85156
added CROW_ENABLE_COMPRESSION macro to enable zlib compression
...
This makes zlib dependency (which is quite problematic) optional
2021-06-03 17:12:20 +03:00
dspverden
5aa45f1ebc
Changed to #ifndef in logging.h
2021-06-02 17:05:52 +02: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
Maxime BELUGUET
811ef62c6f
Fix constness on json dump method #133
2021-05-18 18:10:39 +02:00
The-EDev
0e9b615c2b
fixed typos
2021-05-13 13:30:48 +03:00
The-EDev
f39b9ddce7
Quality of life improvements
...
Added pop() method to query_string, same as get(), but removes the item from the querystring
Added std::string() operator to json::rvalue (allows std::string(json["abc"]), which returns any value that isn't a container to string)
Added lo() method to json::rvalue, returns a vector of json::rvalue containing whatever a json object or list has (difference being a list has no keys)
Added keys() method to json::rvalue, returns a vector of std::string containing the keys of a json object
Made json::wvalue use either std::map or std::unordered_map instead of just std::unordered_map
Added copy constructor to json::wvalue
Added size() method to json::wvalue, returns 1 or the size of the json list.
Added constructor to create json::wvalue from std::vector
Added keys() method to query_string
Documented query_string and improved json doc
Made tests and examples for all the additions
2021-05-12 15:45:55 +03:00
The-EDev
5b7b066c68
fixed typo and incorrect type in assert error
2021-04-14 04:55:27 +03:00
Farook Al-Sammarraie
5f91587479
Merge branch 'master' into catch_all
2021-04-12 23:45:07 +03:00
The-EDev
738abdbd96
fixed issue where response is logged twice
2021-04-12 20:11:03 +03:00
Farook Al-Sammarraie
4aae614297
Merge branch 'master' into catch_all
2021-04-12 10:49:29 +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
7ad1b79b7a
Delete example_catchall.cpp
2021-04-05 10:21:58 +02: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
111bef9deb
use actual ASIO port instead of the local port variable
...
this is useful when using port 0 to have the OS provide a free port
2021-04-04 08:09:59 +03: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