-
Notifications
You must be signed in to change notification settings - Fork 126
Description
We develop a HTTP.SYS based server that have basic file download support (as a minor feature).
We tried to use this functionality to deploy .appinstaller and .msix files for the client side of the application.
However, we get into trouble when the app-installer (on the client side) tries to download the files since it makes partial request (even if our server doesn't advertise that it supports it).
Different UserAgents seems to be used for .appinstaller files (App Virt Client/1.0) and .msix files (Microsoft-Delivery-Optimization/10.1) but both adds Range:bytes=<start>-<end> headers in their requests
form the client logs (Get-DeliveryOptimizationLog | Set-Content c:\temp\dosvc.log) we can see our server responding as if the full file should be downloaded
2d0b72ccb6d09890c4ac3a64796fc50b20991bc2, sessionId: 287a5439-106a-43c9-8bc3-f192fbf75606, url: https://some-host/some-path/myapp_3_7_3_806.msix, isHeadRequest: 0, requestOffset: 21202006, requestSize: 66560, responseSize: 0, serverIp: [NN.NN.NN.NN]:443;, headers: HTTP/1.1 200
Date: Mon, 30 Jun 2025 11:43:24 GMT
Content-Length: 21268566
Content-Type: application/octet-stream
Expires: Wed,01Jan300010:00:00GMT
Server: Microsoft-HTTPAPI/2.0
And then the 0x:80D05011 error appears
2025-06-30T11:43:28.1285776Z 1AC8 A22C Error {CBackgroundCopyJob::NotifyError} Job 8a99596f-b6ff-4045-bba7-259cfea82259, file 2d0b72ccb6d09890c4ac3a64796fc50b20991bc2, hr: 80d05011, state: 1
2025-06-30T11:43:28.1287913Z 1AC8 A22C Info {CTelemetryLogger::TraceJobError} hr = 80d05011, reason hr = 0, jobId = 8a99596f-b6ff-4045-bba7-259cfea82259, caller = MSIX HttpsDataSource Download, fileId = 2d0b72ccb6d09890c4ac3a64796fc50b20991bc2, cdnIp = [NN.NN.NN.NN]:443;
2025-06-30T11:43:28.1302904Z 1AC8 1EB8 Info {CPieceManager::RemovePiecesForOrderedDownload} Piece stats: Pending: [#Incomplete: 0, #In-order: 0], Completed: 0
2025-06-30T11:43:28.1308572Z 1AC8 7D00 Error {} [C:\__w\1\s\src\DeliveryOptimization\DeliveryOptimization\BackgroundCopyJob.cpp, 337] (hr:80D05011)
2025-06-30T11:43:28.1308638Z 1AC8 7D00 Error {} [C:\__w\1\s\src\DeliveryOptimization\dll\ExternalJob.cpp, 106] (hr:80D05011)
I belive that a server need to advertise that i supports partial requests, by adding a response header
Accept-Ranges: bytes
or something similar (I don't claim that I know the details of partial request, so feel free to enlighten me)
It should be noted that the .msix file downloads without any issues from our source when using eg Edge.
I believe that this issue is related to #188