1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-04-06 22:38:51 +02:00

17 Commits

Author SHA1 Message Date
Daniel YU
245f96868a
impl downcast_ref for MessageBody ()
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-02-21 13:31:51 +09:00
Aaron Hill
fe13789345
Use Pin<Box<S>> in BodyStream and SizedStream ()
Fixes 

A better fix would be to change `MessageBody` to take a `Pin<&mut
Self>`, rather than a `Pin<&mut Self>`. This will avoid requiring the
use of `Box` for all consumers by allowing the caller to determine how
to pin the `MessageBody` implementation (e.g. via stack pinning).

However, doing so is a breaking change that will affect every user of
`MessageBody`. By pinning the inner stream ourselves, we can fix the
undefined behavior without breaking the API.

I've included @sebzim4500's reproduction case as a new test case.
However, due to the nature of undefined behavior, this could pass (and
not segfault) even if underlying issue were to regress.

Unfortunately, until  is resolved,
it's not even possible to write a Miri test that will pass when the bug
is fixed.

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-31 09:39:34 +09:00
Kai Ren
cdba30d45f Skip empty chucks for BodyStream and SizedStream ()
* Skip empty chucks for BodyStream and SizedStream when streaming response ()

* Fix tests to fail on previous implementation

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-01-28 18:28:09 +09:00
Nikolay Kim
c1deaaeb2f cleanup imports 2019-12-13 11:24:57 +06:00
Nikolay Kim
6c9f9fff73 clippy warnings 2019-12-08 00:46:51 +06:00
Nikolay Kim
205a964d8f upgrade to tokio 0.2 2019-12-05 23:35:43 +06:00
Nikolay Kim
4dc31aac93 use actix_rt::test for test setup 2019-11-26 11:25:50 +06:00
Nikolay Kim
1ffa7d18d3 drop unpin constraint 2019-11-21 16:02:17 +06:00
Nikolay Kim
5ab29b2e62 migrate awc and test-server to std::future 2019-11-21 16:02:17 +06:00
Nikolay Kim
8cba1170e6 make actix-http compile with std::future 2019-11-21 16:02:17 +06:00
Sarfaraz Nawaz
aa39b8ca6f Add support for serde_json::Value to be passed as argument to ResponseBuilder.body() ()
* Add support for serde_json::Value to be passed as argument to ResponseBuilder.body()

* Update actix-http/CHANGES.md
2019-09-25 09:33:52 +06:00
Nikolay Kim
666756bfbe body helpers 2019-06-01 17:57:25 +06:00
Nikolay Kim
9bb40c249f add h1::SendResponse future; renamed to MessageBody::size 2019-04-10 12:24:17 -07:00
Nikolay Kim
ec09d6fbe6 optimize encode headers and body split 2019-04-07 10:03:38 -07:00
nasa
a655bdac52 Fix clippy warning () 2019-04-05 12:34:24 +03:00
Nikolay Kim
faa3ea8e5b rename BodyLength to BodySize 2019-03-27 09:24:55 -07:00
Nikolay Kim
c7ad677804 Merge actix-http project 2019-03-26 11:54:35 -07:00