actix / actix/actix-web

Connect(Disconnected) when issuing a malformed request enough times

Đang mở
#2,340 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
24.8k
Fork
1.9k
Merge trung bình
23 giờ 10 phút
Pull request đã merge (30 ngày)
26

Mô tả

We faced a potential bug where enough requests malformed would cause a (awc) client to no longer be usable with a given (actix-web) server. These malformed requests had a bad value for an expected enum on the path parameters of the URL.

## Steps to reproduce
1. git clone https://github.com/nmldiegues/actix-mwe-bug.git
2. cargo run --bin server
3. open another shell
4. cargo run --bin client

If you get the following error, then the problem was reproduced:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Connect(Disconnected)', bin/client/src/main.rs:21:56
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic in Arbiter thread.
```

There are a number of things that, when changed, seem to avoid the problem. Hence why this repository isn't as much of a minimal working example as I would have expected. Still, it's short enough to be compiled and ran very quickly to demonstrate the issue.

## Expected and Current Behavior
No amount of malformed requests should cause the `awc` client from becoming unusable for correct requests.
Yet, as is, sending enough bad requests (10 is actually enough) causes a subsequent correct request from failing with the error noted above.

## Environment
Rust Version: 1.53.0
Actix Web Version: 3.3.2
Awc Version: 2.0.3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.