Skip to content

feat(bin): support combined up- and download benchmark #2792

Open
@mxinden

Description

@mxinden

Today, when a server receives a POST, it will read all data off the stream till the end, and then close the stream, sending nothing but a 200 in return.

Http3ServerEvent::Data { stream, data, fin } => {
if let Some(received) = self.posts.get_mut(&stream) {
*received += data.len();
}
if fin {
if let Some(received) = self.posts.remove(&stream) {
let msg = received.to_string().as_bytes().to_vec();
stream
.send_headers(&[Header::new(":status", "200")])
.unwrap();
stream.send_data(&msg).unwrap();
stream.stream_close_send().unwrap();
}
}
}

In case the client requested a response via the /<some-number-of-bytes-to-respond-with> pattern, the server ignores it.

} else if let Ok(count) =
path.value().trim_matches(|p| p == '/').parse::<usize>()

In other words, neqo-bin/src/server/http3.rs does not support a combined up- and download.

Fixing this, I assume, is more about eliminating this pitfall than about providing value through a combined upload and download benchmark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededp3Backlogtask-tinyThis issue should take one hour or less.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions