Skip to content

Commit

Permalink
fix(client): only take single url on (args.resume && first)
Browse files Browse the repository at this point in the history
QUIC Interop Runner testcases `resumption` and `0-rtt` expect the client to
download the first file, close the connection, and then download the remaining
files on a second connection.

https://github.com/quic-interop/quic-interop-runner/tree/master#test-cases

Thus `neqo-client`, when `args.resume` is `true` must only take a single URL on
the **first** loop iteration. On the second iteration it must take all remaining
URLs.

Regression introduced in mozilla#1569.
  • Loading branch information
mxinden committed Jan 23, 2024
1 parent e447eef commit 08bc808
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion neqo-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1086,13 +1086,16 @@ fn main() -> Res<()> {

let hostname = format!("{host}");
let mut token: Option<ResumptionToken> = None;
let mut first = true;
while !urls.is_empty() {
let to_request = if args.resume || args.download_in_series {
let to_request = if (args.resume && first) || args.download_in_series {
urls.pop_front().into_iter().collect()
} else {
std::mem::take(&mut urls)
};

first = false;

token = if args.use_old_http {
old::old_client(
&args,
Expand Down

0 comments on commit 08bc808

Please sign in to comment.