1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-19 16:58:14 +00:00
Commit graph

63 commits

Author SHA1 Message Date
Raphael C 48d7adb7bf
Documentation for actix multipart (#3344)
example for actix-multipart readme & crate docs

Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-05-18 19:02:00 +00:00
Rob Ede c1a6388614
refactor: address clippy warnings 2024-05-06 06:03:44 +01:00
dependabot[bot] 8c31d137aa
build(deps): bump taiki-e/install-action from 2.26.18 to 2.27.2 (#3294)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-02-19 12:31:10 +00:00
Rob Ede 82f8ddc38f
feat: multipart testing utilities (#3288) 2024-02-14 22:22:07 +00:00
Rob Ede 5e5e5d8315
chore: remove allow(uninlined_format_args) 2023-12-16 10:33:00 +00:00
Rob Ede 905c30af86
Actix Web Rustls v0.21 support (#3116) 2023-08-29 01:11:11 +01:00
Rob Ede 3b9b38c44e
fix tempfile dep spec 2023-07-18 02:22:09 +01:00
Rob Ede 79a38e0628
apply standard formatting 2023-07-17 02:38:12 +01:00
Rob Ede 241da6e081
update MSRV to 1.65 (#3059) 2023-07-02 01:09:15 +01:00
Rob Ede 67efa4a4db
migrate to doc_auto_cfg 2023-02-26 21:55:25 +00:00
Jacob Halsey d4b833ccf0
actix-multipart: Feature: Add typed multipart form extractor (#2883)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-02-26 03:26:06 +00:00
Rob Ede 6f0a6bd1bb
address clippy lints
For intrepid commit message readers:
The choice to add allows for the inlined format args lint instead of actually
inlining them is not very clear because our actual real world MSRV is not clear.
We currently claim 1.60 is our MSRV but this is mainly due to dependencies. I'm
fairly sure that we could support < 1.58 if those deps are outdated in a users
lockfile. We'll remove these allows again at some point soon.
2023-01-01 20:56:34 +00:00
Rob Ede 29bd6a1dd5
fix version requirement for futures_util 2022-12-18 01:34:48 +00:00
Alex 068909f1b3
Replace deprecated twoway with memchr (#2909) 2022-10-14 11:52:13 +00:00
Rob Ede cc7145d41d
rust 1.64 clippy run (#2891) 2022-09-25 20:54:17 +01:00
Jacob Halsey fd63305859
Fix actix-multipart field content_type() to return an Option (#2885)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-09-23 17:06:40 +00:00
Rob Ede 1296e07c48
relax unpin bounds on payload types (#2545) 2021-12-24 17:47:47 +00:00
Rob Ede 07f2fe385b
standardize crate level lints 2021-12-08 06:09:56 +00:00
Rob Ede e1a2d9c606
Quality / QualityItem improvements (#2486) 2021-12-05 03:38:08 +00:00
Rob Ede c4b20df56a
convert all remaining IETF RFC links to new format 2021-12-02 03:45:04 +00:00
Ali MJ Al-Nasrawy 654dc64a09
don't hang after dropping mutipart (#2463) 2021-11-29 02:00:24 +00:00
fakeshadow 89c6d62656
clean up multipart and field stream trait impl (#2462) 2021-11-25 00:10:53 +00:00
fakeshadow 52bbbd1d73
Mnior cleanup of multipart API. (#2461) 2021-11-24 20:53:11 +00:00
Rob Ede e33618ed6d
ensure content disposition header in multipart (#2451)
Co-authored-by: Craig Pastro <craig.pastro@gmail.com>
2021-11-17 17:44:50 +00:00
Arniu Tseng 8ae278cb68
Remove FromRequest::Config (#2233)
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-09-11 01:11:16 +01:00
Rob Ede 44c55dd036
remove cookie support from -http (#2065) 2021-04-09 18:07:10 +01:00
Rob Ede c8ed8dd1a4
migrate to -utils beta 4 (#2127) 2021-04-01 15:26:13 +01:00
Rob Ede 3188ef5731
don't use rust annotation on code doc blocks 2021-03-25 08:45:52 +00:00
Rob Ede f6393728c7
remove usage of actix_utils::mpsc (#2023) 2021-02-24 09:08:56 +00:00
Rob Ede 31d9ed81c5
change rustfmt line width to 96 2021-02-11 23:03:17 +00:00
Rob Ede a290e58982
prepare beta 2 release set (#1975) 2021-02-10 12:10:03 +00:00
Rob Ede 2d4a174420
fmt 2021-01-04 01:01:35 +00:00
Rob Ede 21f6c9d7a5
improve code readability 2021-01-04 00:49:02 +00:00
Juan Aguilar 542db82282
Simplify wake up of task (#1826) 2020-12-12 20:07:06 +00:00
Matt Gathu 37c76a39ab
Fix Multipart consuming payload before header checks (#1704)
* Fix Multipart consuming payload before header checks

What
--
Split up logic in the constructor into two functions:

- **from_boundary:** build Multipart from boundary and stream
- **from_error:** build Multipart for MultipartError

Also we make the `boundary`, `from_boundary`, `from_error`  methods public within the crate so that we can use them in the extractor.

The extractor is then able to perform header checks and only consume the
payload if the checks pass.

* Add tests

* Add payload consumption test

Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-09-25 14:50:37 +01:00
Rob Ede 7787638f26
fix CI clippy warnings (#1664) 2020-09-10 14:46:35 +01:00
Rob Ede 2f6e9738c4
prepare multipart and actors releases (#1663) 2020-09-10 12:54:27 +01:00
Yuki Okushi 92b5bcd13f
Check format and tweak CI config (#1619) 2020-07-22 00:28:33 +01:00
Yuki Okushi ab4d8704f1
multipart: Minimize futures dependencies 2020-05-19 08:29:11 +09:00
__JM_Joy__ 3dc859af58
Fix missing std::error::Error implement for MultipartError. (#1382)
* Fix missing `std::error::Error` implement for `MultipartError`.

* Update actix-multipart CHANGES.md.
2020-02-27 22:34:06 +09:00
Nikolay Kim b4b3350b3e Add websockets continuation frame support 2019-12-12 14:06:54 +06:00
Alexander Larsson a612b74aeb actix-multipart: Fix multipart boundary reading (#1205)
* actix-multipart: Fix multipart boundary reading

If we're not ready to read the first line after the multipart field
(which should be a "\r\n" line) then return Pending instead of Ready(None)
so that we will get called again to read that line.

Without this I was getting MultipartError::Boundary from read_boundary()
because it got the "\r\n" line instead of the boundary.

Also tweaks the test_stream test to test partial reads.

This is a forward port of #1189 from 1.0

* actix-multipart: Update changes for boundary fix
2019-12-12 07:03:44 +06:00
Nikolay Kim 205a964d8f upgrade to tokio 0.2 2019-12-05 23:35:43 +06:00
Nikolay Kim f73f97353b refactor ResponseError trait 2019-11-26 16:07:39 +06:00
Nikolay Kim 4dc31aac93 use actix_rt::test for test setup 2019-11-26 11:25:50 +06:00
Nikolay Kim 471f82f0e0 migrate actix-multipart 2019-11-21 16:02:17 +06:00
Nikolay Kim 60b7aebd0a fmt & clippy 2019-09-12 21:52:46 +06:00
Jeffrey Shen 1d96ae9bc3 actix-multipart: Correctly parse multipart body which does not end in CRLF (#1042)
* Correctly parse multipart body which does not end in CRLF

* Add in an eof guard for extra safety
2019-09-09 13:58:00 +06:00
Nikolay Kim fbdda8acb1 Unix domain sockets (HttpServer::bind_uds) #92 2019-07-18 17:24:12 +06:00
Aaron Hill b36fdc46db Remove several usages of 'unsafe' (#968)
* Replace UnsafeCell in DateServiceInner with Cell

The previous API was extremely dangerous - calling `get_ref()`
followed by `reset()` would trigger instant UB, without requiring
any `unsafe` blocks in the caller.

By making DateInner `Copy`, we can use a normal `Cell` instead
of an `UnsafeCell`. This makes it impossible to cause UB (or even panic)
with the API.

* Split unsafe block HttpServiceHandlerResponse

Also add explanation of the safety of the usage of `unsafe`

* Replace UnsafeCell with RefCell in PayloadRef

This ensures that a mistake in the usage of 'get_mut' will cause
a panic, not undefined behavior.
2019-07-18 04:45:17 +06:00