http-rs / http-rs/async-h1

'internal error: missing mime' when echoing body without Content-Type

Open
#66 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
166
Forks
49
PR merge metrics
No merged PRs in 30d

Description

`async_h1::accept` panics with the following endpoint and request:

```rust
|req| async move {
let mut res = Response::new(StatusCode::Ok);
res.set_body(req);
Ok(res)
}
```

```
POST / HTTP/1.1
content-length: 0

```

Contributor guide

Open the contributing guide

Research direction

Reproduce the panic through async_h1::accept using the endpoint and POST request shown in the issue, then inspect how a response body is handled when Content-Type is absent. Done means the request completes without the “internal error: missing mime” panic; the issue does not name a source file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.