actix / actix/actix-web

Connect(Disconnected) when issuing a malformed request enough times

Ouverte
#2,340 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
24.8k
Forks
1.9k
Merge moyen
23 h 10 min
PR mergées (30 j)
26

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.