okaestne
9e7015281e
http_response: don't try to move temporary
2022-11-08 10:32:37 +01:00
okaestne
2970f81001
app: remove unused lambda caption
2022-11-08 10:32:37 +01:00
okaestne
5543276c4e
http_connection: initialize task_id_
2022-11-05 23:08:54 +01:00
okaestne
323a7cb48f
routing: use object references instead of raw pointers
...
this fixes some memory leaks.
also remove unused `get_size` method.
2022-11-05 23:08:49 +01:00
Seungwoo Kang
ac757ff0c9
Fix websocket crash from connection pointer dangling ( #530 )
...
* websocket: Add dangling-prevent anchor pointer
* websocket: Fix deadlock from incorrect expiration expectation
* webscoket: Fix unsafe write access to anchor_
* websocket: Fix build error from use of 'nullptr_t'
* websocket: Remove latent dereferencing on dangling 'this' pointer
* websocket: Resolve conflict with master branch
Co-authored-by: Vladislav <vladislav.oleshko@gmail.com>
2022-10-09 19:03:52 +03:00
Ryan Russell
f5adec7803
refactor(websocket): readability improvements ( #541 )
...
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Co-authored-by: Vladislav <vladislav.oleshko@gmail.com>
2022-09-19 00:34:43 +03:00
Seungwoo Kang
1e47bc67ba
websocket: Reduce number of re-allocation of string parameters ( #535 )
...
Co-authored-by: Vladislav <vladislav.oleshko@gmail.com>
2022-09-18 23:57:37 +03:00
Ryan Russell
33becfb353
docs(middlewares): readability improvements ( #540 )
...
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-09-18 23:24:29 +03:00
Jake Arkinstall
0b90bb486c
Address #534 - handling missing mime types gracefully ( #536 )
...
* Added tests for content-type to mime-type detection.
Added a custom_content_types test case that verifies that a user can
specify the mime-type through the contentType parameter upon creation
of a response. If their contentType does not appear in the mime_types
map, but looks like a valid mime type already, it should be used as the
mime type.
Validating against the full list of valid mime types
(https://www.iana.org/assignments/media-types/media-types.xhtml )
would be too intensive, so we merely verify that the parent type
(application, audio, font, text, image, etc) is a valid RFC6838
type, and that the subtype is at least one character. Thus we can
verify that custom/type fails, and incomplete strings such as
image/ and /json fail.
2022-09-12 14:16:16 +03:00
Farook Al-Sammarraie
27439944b0
Merge branch 'master' into fix-stack-data-disclosure
2022-08-23 00:22:17 +03:00
Igor Mróz
d17a88af69
Fix stack data disclosure when returning static files smaller than
...
16KiB. It could also cause to return partially incorrect file ending in
case of file not being rounded up to 16KiB.
Thanks to Gynvael Coldwind and hebi for discovering and preparing
report.
2022-08-22 20:15:03 +02:00
The-EDev
0aa3ab94be
fixed unit-tests and warnings
2022-08-22 00:38:03 +03:00
The-EDev
fba01dc76d
Prevent HTTP pipelining which Crow doesn't support.
2022-08-21 21:33:04 +03:00
erik
b12767133a
Don't use std::filesystem when compiling in C++17 mode on gcc < 8
...
On gcc < 8, filesystem had to be included as <experimental/filesystem>, it
was also living in the std::experimental namespace, and also required the user
to link against -lstdc++fs.
2022-08-06 00:59:57 +03:00
erik
99c4569408
Fix compilation error using std::filesystem::path
...
A std::filesystem::path is not implicitly convertible to a std::string.
2022-08-06 00:59:57 +03:00
Farook Al-Sammarraie
4e4dbec120
formatting
2022-07-25 13:56:54 +03:00
The-EDev
5f22a6562a
made CROW_STATIC_DIRECTORY and BP static directory more versatile (on
...
win and linux)
2022-07-25 13:56:54 +03:00
Vladislav Oleshko
34d8bd34bc
Add template keyword to CROW_MIDDLEWARES
2022-07-24 00:31:34 +03:00
The-EDev
25eefa1711
Addressed code reviews + small tweaks (unit test and paser.done())
2022-07-22 17:17:38 +03:00
The-EDev
b986d1e38a
Find the route as soon as the URL is parsed
2022-07-22 17:17:38 +03:00
Vladislav Oleshko
c105a86a7a
Fix struct/class divergence
2022-07-22 00:45:40 +03:00
Alireza Mohammadi
8ee2a0f93d
Fix build warnings
2022-07-20 14:59:56 +04:30
Iulian Radu
31160579ea
Update multipart.h
...
format
2022-07-18 22:08:44 +03:00
Radu Iulian
b89d13ac3b
fixed formatting
2022-07-18 21:42:14 +03:00
Radu Iulian
a4bab45fcd
get_part_by_name doesn't crash on nonexistent keys
2022-07-18 21:03:42 +03:00
Luca Schlecker
6128a0df11
Merge branch 'master' into sessions
2022-07-14 19:42:55 +02:00
Vladislav Oleshko
cee7f78ec8
Small fixes
2022-07-14 20:20:34 +03:00
Vladislav Oleshko
fb327f4a88
formatting
2022-07-10 14:52:31 +03:00
Vladislav Oleshko
c6255750e6
Reuse cookie parser constructor
2022-07-10 14:45:40 +03:00
Alexander Goussas
1bdcd317b7
add response constructor overload
2022-07-05 17:14:50 -05:00
Vladislav
36e59f07ec
Merge branch 'master' into sessions
2022-07-04 12:54:15 +03:00
Vladislav Oleshko
f505c152e1
Remove custom keys
2022-07-04 12:27:25 +03:00
Vladislav Oleshko
cbdb127b98
Small naming fixes
2022-07-04 10:50:14 +03:00
erik
fcd38e7447
Fixed bug: Could not define route for HEAD method
...
Defining a HEAD method would give HTTP error code 405 (Method Not Allowed) and
calling OPTIONS on the route would return HEAD twice in the Allow header.
2022-06-30 08:07:11 +02:00
The-EDev
79eec91f00
Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value
2022-06-27 22:38:24 +03:00
Vladislav
b7022e5fa2
Merge branch 'master' into sessions
2022-06-25 15:42:17 +03:00
Vladislav Oleshko
2e0e5935ff
Add docs, fix comment
2022-06-23 13:19:47 +03:00
Vladislav Oleshko
a251928732
Add more comments to example, small fixes
2022-06-23 10:59:44 +03:00
Vladislav Oleshko
93710edd77
Merge branch 'master' into sessions
2022-06-22 20:47:47 +03:00
Vladislav Oleshko
4c5807de81
Support char[]/char* for set/get, small fixes
2022-06-22 20:47:13 +03:00
MichaelSB
97405c88ab
Merge branch 'master' into response_check_file_type
2022-06-22 19:45:22 +02:00
Luca Schlecker
3a485078b8
rework the way asio is handled as a dependency.
2022-06-22 18:14:09 +02:00
MichaelSB
6d6d36d9b6
Merge branch 'master' into response_check_file_type
2022-06-22 16:55:18 +02:00
Vladislav Oleshko
ea4c672a41
Emulate variant with json wvalue for C++11/14
2022-06-22 17:02:16 +03:00
Michael Schreckenbauer
83cde80023
added comment on S_ISREG
2022-06-22 15:00:00 +02:00
MichaelSB
5f73f39ea7
Simplified condition for defining S_ISREG
...
Co-authored-by: Farook Al-Sammarraie <farook@the-e-dev.com>
2022-06-22 14:54:52 +02:00
Vladislav Oleshko
6b6eb5eb0b
Merge branch 'master' into sessions
2022-06-22 15:21:34 +03:00
Vladislav Oleshko
a9135bddd5
Move out from detail namespace, small changes
2022-06-22 15:18:32 +03:00
Michael Schreckenbauer
cde0e67b06
move includes outside namespace crow
2022-06-22 11:16:33 +02:00
Michael Schreckenbauer
beb6e86b1e
Merge branch 'response_check_file_type' of github.com:MichaelSB/Crow into response_check_file_type
2022-06-22 10:55:51 +02:00