http-rs / http-rs/async-h1

When acting as a client, processing HTTP/1.0 responses fails

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

Description

It seems like this line is the issue: https://github.com/http-rs/async-h1/blob/a1448c379b0cce920e44c62b566bb20db1ce2157/src/client/decode.rs#L65

It is my understanding there shouldn't be a meaningful difference parsing a HTTP/1.0 with a 1.1 parser since the only differences are some extra headers and possible result codes which wouldn't exist in the 1.0 response.

`httparse_res.version` will be `0` in the case of a HTTP/1.0 response. Perhaps that code is attempting to match on the major version number, however `httparse` uses that field for the minor one which is a bit unintuitive.

Contributor guide

Open the contributing guide

Research direction

Start by reading src/client/decode.rs around line 65 and reproduce the failure with an HTTP/1.0 response. Check how httparse_res.version is interpreted and verify that a valid HTTP/1.0 response can be processed by the client. Done means HTTP/1.0 responses no longer fail during client-side decoding.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.