Commit Graph

906 Commits

Author SHA1 Message Date
Lucas David
1bb5e0ac63 + auto to_read = static_cast<std::uint64_t>(buffer_.size());
~ if (remaining_length_ < to_read)
~   to_read = remaining_length_;
+ adaptor_.socket().async_read_some(boost::asio::buffer(buffer_, static_cast<std::size_t>(to_read))
- size_t to_read = buffer_.size();
~ if (remaining_length_ < to_read)
~   to_read = remaining_length_;
- adaptor_.socket().async_read_some( boost::asio::buffer(buffer_, to_read)

~ Changed 'to_read' from [std::size_t] to [std::uint64_t],
  hence when 'remaining_length_' [std::uint64_t] is assigned in 'to_read' no data is lossed.
  When boost::asio::buffer is created 'to_read' is casted back to [std::size_t] explicitly truncating data.
  It seems to be the correct behavior to choose fixed 'network side' types.
2021-07-27 17:04:54 +02:00
Lucas David
6aa5dba579 + buf[1] += static_cast<char>(size);
- buf[1] += size;

~ Warning was triggered by 'size' being std::size_t and lossing data by implicit casting to a narrower type.
  This behavior seems correct, then we can explicit cast it.
2021-07-27 15:39:51 +02:00
The-EDev
36c8355b59 Merge branch 'master' 2021-07-27 10:54:47 +03:00
The-EDev
06c4829ca7 implemented all blueprint features 2021-07-27 10:52:49 +03:00
The-EDev
dad25b0dab use github as readme logo source (doesn't require CI to show logo changes) 2021-07-26 14:04:32 +03:00
The-EDev
6878897f0a Added logo that works in light and dark mode for github readme 2021-07-26 14:02:31 +03:00
Farook Al-Sammarraie
cbf1b66481
Create FUNDING.yml 2021-07-26 01:31:50 +03:00
Farook Al-Sammarraie
d54d0bd7ae
Merge pull request #172 from CrowCpp/newlogo
Update Logo
2021-07-24 09:37:44 +03:00
The-EDev
5c637380a0 fixed typo in disclaimer 2021-07-23 12:00:43 +03:00
The-EDev
337f1a45f5 Updated Logo and made logo copyright clear 2021-07-23 01:17:36 +03:00
The-EDev
c5d00f784b Added disclaimer to clear any potential misconceptions between this project and the original 2021-07-22 01:10:57 +03:00
The-EDev
27fe952a0c Merge branch 'master' 2021-07-20 11:00:09 +03:00
Farook Al-Sammarraie
b18fbb18f0
Merge pull request #166 from CrowCpp/better_trie
Re-implemented the Trie crow uses to match rules with URLs
2021-07-19 23:43:52 +03:00
The-EDev
6d6fbe2385 removed unnecessary boolean 2021-07-19 00:01:20 +03:00
Farook Al-Sammarraie
603dbe3850
Merge branch 'master' into better_trie 2021-07-11 17:39:24 +03:00
Farook Al-Sammarraie
5b6d9e1503
Merge pull request #165 from CrowCpp/license_editing
License Correction
2021-07-11 16:58:04 +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
4710c10120 fixed comment problem 2021-07-10 21:48:42 +03:00
The-EDev
6ee7d298a4 Edited license to reflect the change in development, and merge_all to add it to crow_all.h 2021-07-10 21:24:52 +03:00
The-EDev
ea597d804a blueprint specific templates directory now supported 2021-07-07 15:51:04 +03:00
Farook Al-Sammarraie
1b458cda6f
Merge pull request #162 from CrowCpp/release_script
Add release script. Change server name to use release version to buil…
2021-07-06 20:47:01 +03:00
Farook Al-Sammarraie
da9f2e4531
Merge branch 'master' into release_script 2021-07-06 20:08:59 +03:00
Igor Mróz
3839a4a8e5
Add CROW_MAIN ifdef to VERSION variable. Move it to namespace. 2021-07-06 19:07:34 +02: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
321f9c7fe6 Merge branch 'master' 2021-07-06 01:51:50 +03:00
The-EDev
408166a06f removed extra semicolon (from @luxe) 2021-07-05 21:04:51 +03:00
Farook Al-Sammarraie
475e20b0e6
Merge pull request #163 from CrowCpp/patch_static_folder
Patch Static Folder
2021-07-05 12:51:22 +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
Igor Mróz
fea3eb03d0
Turn off building examples and tests in release script. 2021-07-04 21:41:00 +02:00
Igor Mróz
1d270fae19
Add release script. Change server name to use release version to build name. 2021-07-03 22:02:32 +02:00
Farook Al-Sammarraie
a8e55b7a09
Merge pull request #161 from odeits/patch-1
Fix typo in example_with_all.cpp
2021-07-03 20:10:05 +03:00
odeits
ea07b8ac04
Fix typo in example_with_all.cpp 2021-07-03 17:08:12 +02:00
Farook Al-Sammarraie
3c6f2420db
Merge pull request #157 from luca-schlecker/main
http_response: fix move assign operator not moving file_info.
2021-06-28 19:38:11 +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
f95f11547e added CROW_MAIN definition to readme examples (also mkdocs index) 2021-06-28 18:56:27 +03:00
The-EDev
189e0709b1 explained CROW_JSON_NO_ERROR_CHECK 2021-06-28 13:01:12 +03:00
The-EDev
449ad7a82d added missing line to docs 2021-06-24 11:48:01 +03:00
The-EDev
fc27f73f84 Bump server version to 0.3 2021-06-05 06:30:01 +03:00
Farook Al-Sammarraie
426926c43c
Merge pull request #142 from CrowCpp/optional_compression
Make Zlib dependency optional
2021-06-05 05:03:24 +03:00
The-EDev
2dde0ac950 updated documentation to fix a few mistakes, clear up a few points, and added compression guide 2021-06-03 17:12:48 +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
Farook Al-Sammarraie
4579d7b63b
Merge pull request #139 from dspverden/master
IDE DEBUG symbol
2021-06-02 18:35:46 +03:00
dspverden
5aa45f1ebc Changed to #ifndef in logging.h 2021-06-02 17:05:52 +02:00
dspverden
00ed2005bc IDE DEBUG symbol 2021-06-02 16:11:36 +02:00
Farook Al-Sammarraie
44748e63ea
Merge pull request #137 from thinking-tower/feature/visual-studio-installation
Feature/visual studio installation
2021-05-24 20:04:56 +03:00
Darius Tan
d7f1985e4c Edit example_vs.cpp to use CROW_ROUTE instead of app.route_dynamic.
VS2019 error:
'<function-style-cast>': cannot convert from 'void' to 'crow::response'
2021-05-23 20:59:21 +12:00
Darius Tan
44abb2d327 Add vcpkg.json to download Boost, openssl and zlib. Edit docs/getting-started/setup.md to show a simple setup with example_with_all.cpp. 2021-05-23 20:58:23 +12: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