Farook Al-Sammarraie
ab50fb3134
Merge branch 'master' into parser_optimization
2022-02-11 00:46:19 +03:00
The-EDev
9f6e099f10
fixed issue where content length was being set but body wasn't being sent
2022-02-09 20:57:12 +03:00
Vhuynh25
07a2422c63
changed output to null and changed warning message
...
also changed from <cmath> to <math.h>
2022-02-08 15:45:49 -08:00
Vhuynh25
7672f3a0f9
Merge branch 'CrowCpp:master' into master
2022-02-08 18:42:38 -05:00
The-EDev
dcd2b0c318
format
2022-02-08 19:22:09 +03:00
The-EDev
6ad068494f
sanitize load_text() path
2022-02-08 19:14:55 +03:00
The-EDev
155cf759eb
fixed issue where absolute unix paths were not sanitized
2022-02-08 19:11:46 +03:00
Vhuynh25
c44fec82bf
added space to match clang format
2022-02-06 11:58:41 -08:00
The-EDev
175b004c26
code formatting (also disabled formatting where not applicable)
2022-02-06 22:29:46 +03:00
The-EDev
75b100527f
Merge branch 'refs/heads/master' into parser_optimization
2022-02-05 18:35:01 +03:00
The-EDev
4cdde73388
Optimized HTTP parser
...
Also (likely) fixed problem with streaming without keeping connection
alive
Also fixed problem with multipart hanging on request
Also updated TODO entries to indicate Writer
2022-02-05 18:15:19 +03:00
Vhuynh25
781a40bee1
fixed clang format
2022-02-03 09:07:54 -08:00
Vien Huynh
c21ae7ea3e
change NaN output warning message
2022-02-01 16:40:07 -05:00
Vien Huynh
a134e2b9ff
fixed NaN handling errors
2022-02-01 15:31:09 -05:00
Vien Huynh
9af906dc21
fixed JSON outputting NaN and infinite values
2022-01-30 23:43:30 -05:00
Farook Al-Sammarraie
9689688193
Merge branch 'master' into json-crash
2022-01-29 11:39:10 +03:00
Thomas Neumann
3569c93984
defend against excessive recursion in json::load
...
Passing a deeply nested JSON structure to json::load leads to a crash
due to stack overflow. We handle this now gracefully by limiting the
maximum nesting depth to 10,000.
Test case:
https://github.com/nst/JSONTestSuite/blob/master/test_parsing/n_structure_100000_opening_arrays.json
2022-01-25 08:48:36 +01:00
Thomas Neumann
2a77083524
fix const correctness in template_t
...
Without locking we can safely share only const objects between threads.
crow::mustache::template_t will typically be loaded once and then
reused many times across threads. Unfortunately the render() method
was not marked as const, even though it is const is practice. This commit
adds the missing const annotations to the methods involved.
2022-01-24 20:41:29 +01:00
Thomas Neumann
74e5fa8c87
improve sanitize_filename
...
The old implementation allocated a new string for every invocation, and
repeatedly scanned the string for occurences of the various Windows device
names. This commits resizes the original string instead if needed, and
detects all devices with a single pass.
2022-01-24 08:08:20 +01:00
Thomas Neumann
15085a9f95
avoid memory allocation in base64decode
...
Every single call to base64decode allocates a mapping table for all
base64 characters. This is quite wasteful, as the map is in fact static.
We could use a static variable here, but that would have unpleasant consequences
if we ever encounter input with non-valid base64 characters (which
implicitly modifies the map).
The number of character ranges for base64 is quite low (3, plus 4 exceptions),
thus we can simply check that explicitly in code instead of using a dynamic hash table.
2022-01-24 07:24:34 +01:00
The-EDev
e688cbd18e
Fixed another vulnerability in mustache file loading
...
and made the file sanitizer a copy-less function
2022-01-11 21:48:51 +03:00
The-EDev
0a16021442
Fix vulnrabilities in mustache and static
2022-01-11 20:27:41 +03:00
The-EDev
7aee13eee9
Changed the way concurrency is used
...
(it actually reflects the thread count properly)
2021-12-23 05:39:39 +03:00
The-EDev
77758e6241
Have concurrency
represent the actual number threads used
2021-12-20 11:04:55 +03:00
Farook Al-Sammarraie
fa77468a88
Formatting
2021-12-17 09:45:50 +03:00
Farook Al-Sammarraie
0ef48e82bb
Fixed scoping issue
...
introduced by initializing `execute_result`
2021-12-17 09:30:58 +03:00
Farook Al-Sammarraie
790e34cea8
Merge branch 'master' into mustache_lambdas
2021-12-17 09:08:24 +03:00
Farook Al-Sammarraie
cca1d54ce5
took repeated code out of the if else statement
2021-12-17 09:07:46 +03:00
Farook Al-Sammarraie
ddc1f18a1e
Merge branch 'master' into issue-302
2021-12-17 08:11:57 +03:00
Mosolov Sergey
d59cda5677
Fixes issue 302
...
https://github.com/CrowCpp/Crow/issues/302
Escape only the invisible characters from 0 to 31 inclusive
Motivation: do not escape UTF8 encoding bytes
2021-12-17 08:47:00 +04:00
Navid Jalali
8de7ec2123
Missing inline specifier in http_status_str function definition fixed
2021-12-16 19:41:03 +03:30
Farook Al-Sammarraie
97baca78da
Merge branch 'master' into parser_upgrade
2021-12-16 12:53:24 +03:00
The-EDev
f6fd7dc85d
formatting, missing newline fixed
2021-12-11 02:38:30 +03:00
The-EDev
228e61d150
Added mustache lambda expansion
2021-12-10 05:17:25 +03:00
The-EDev
a1a4169d92
merge branch master
2021-12-10 05:12:24 +03:00
The-EDev
14acb50030
fixed server_ name
2021-12-08 19:57:10 +03:00
The-EDev
13768371a9
Fixed problems with signals
2021-12-08 05:21:03 +03:00
The-EDev
e110cf4856
upgraded parser from 2.3.0 to 2.9.4
2021-12-07 22:21:33 +03:00
Maxime BELUGUET
a997c2b69f
Formatting
2021-12-07 14:15:11 +01:00
Maxime BELUGUET
dea78e02a0
Merge branch 'master' into master
2021-12-07 14:12:29 +01:00
Maxime BELUGUET
95083c1c9e
Improve pick_io_service_idx
2021-12-07 11:06:18 +01:00
Maxime BELUGUET
874b4d2da0
Apply suggestions from code review
...
Add debug verbosity
Co-authored-by: Farook Al-Sammarraie <farook@the-e-dev.com>
2021-12-07 10:58:40 +01:00
Farook Al-Sammarraie
63c8af74f7
Merge branch 'master' into gcc8-workaround
2021-12-04 14:34:58 +03:00
Florian Rupprecht
24d8a72a94
Update include/crow/app.h
...
Co-authored-by: Farook Al-Sammarraie <farook@the-e-dev.com>
2021-12-04 12:32:32 +01:00
Farook Al-Sammarraie
faa81ec4a5
Merge branch 'master' into auth_tutorial
2021-12-04 04:17:09 +03:00
Maxime BELUGUET
06332c46b8
Move queue length initialisation
2021-12-03 17:40:10 +01:00
Maxime BELUGUET
5825b55350
Move queue length decrementation, formatting
2021-12-03 17:33:40 +01:00
The-EDev
869bc53150
format
2021-12-03 07:05:10 +03:00
The-EDev
78c88bbbb7
Updated mime_types script:
...
Made script generated code format compliant
Added option to have the script download the source file directly
Added generation date
Also updated the header file to the latest nginx mime.types
2021-12-03 06:41:30 +03:00
The-EDev
94a2f942bc
changed comment style back to the original (doxygen did not work with the new style)
2021-12-03 06:39:23 +03:00