Skip to content

Retried HTTP requests append Range headers ad-infinitum #202

@polarina

Description

@polarina

auto tempList = curl_slist_append(_requestContext.requestHeaders, rangeHeader.c_str());

We experienced this issue through the deviceupdate-agent. When a TCP stream is interrupted, the agent retries the request with a Range request.

When said range request itself gets interrupted, subsequent retries are sent with multiple Range headers present. The CDN silently honours only the first Range header where the agent gets a different set of data in response than what it expected, ultimately resulting in the corruption of the downloaded file.

GET /northeurope/redacted/redacted/redacted.gpt HTTP/1.1
Host: uuid--redacted.b.nlu.dl.adu.microsoft.com
User-Agent: Microsoft-Delivery-Optimization-Lite/10.0.0.1
Accept: */*
Range: bytes=6732-390070271
Range: bytes=39692-390070271
Range: bytes=71184-390070271
Range: bytes=82236-390070271
Range: bytes=97668-390070271
Range: bytes=120796-390070271
Range: bytes=149368-390070271
Range: bytes=178052-390070271
Range: bytes=208084-390070271
Range: bytes=225369-390070271
Range: bytes=242261-390070271

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions