The toy parser splits two query pairs in order.
The toy parser splits two pairs
The query rows keep q first and page second.
two query pairs
q chooses cat
The first pair row is q=cat.
q=cat
page chooses two
The second pair row has page value 2.
page=2
Summary
The two choices come from the query string, not from headers.
pairs parsed in order