actix / actix/actix-web

Connect(Disconnected) when issuing a malformed request enough times

Aperta
#2,340 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
24.8k
Fork
1.9k
Merge medio
23h 10m
PR unite (30g)
26

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.