Closed atauenis closed 1 year ago
Looked into traffic.
GET http://au.download.windowsupdate.com/c/msdownload/update/software/secu/2013/10/windowsserver2003.windowsxp-kb2893294-x64-enu_25ad5a20170b2ca965771c01a8c1e4dc55f3309b.exe HTTP/1.1
Accept: */*
Accept-Encoding: identity
Range: bytes=0-6361
User-Agent: Microsoft BITS/6.7
Host: au.download.windowsupdate.com
Proxy-Connection: Keep-Alive
HTTP/1.1 206 Partial Content
Cache-Control: public, max-age=172800
Via: HTTP/1.0 WebOne/0.15.1.0
Content-Length: 6362
Content-Type: application/octet-stream
Last-Modified: Tue, 22 Oct 2013 19:47:45 GMT
Accept-Ranges: bytes
Age: 0
ETag: "8086de935fcfce1:0"
Server: ECAcc,(ska/F761) Microsoft-HTTPAPI/2.0
X-CCC: SE
X-CID: 11
X-Powered-By: ASP.NET
Date: Sun, 12 Feb 2023 16:28:47 GMT
(the file goes below)
In a 206
response to request with Range
header, the server must return Content-Range
header. But WebOne cuts it somewere...
Problem number 2. After few restarts of test machine, it tried to refresh WU cookies. And seems that it is not possible to access them via WebOne.
12.02.2023 19:47:58.810+571 Got a request.
12.02.2023 19:47:58.810+120576 >POST http://legacyupdate.net/v6/ClientWebService/client.asmx (192.168.56.102)
12.02.2023 19:47:58.810+936697 >Uploading 1K of text/xml (connecting)...
12.02.2023 19:47:58.810+4945077 ============GURU MEDITATION:
System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method.
at WebOne.HttpOperation.SendRequest() in WebOne\HttpOperation.cs:line 144
On URL 'http://legacyupdate.net/v6/ClientWebService/client.asmx', Method 'POST'.
Returning 500.============
12.02.2023 19:47:58.810+4952544 <Return code 500.
12.02.2023 19:47:58.810+5042006 <Done.
POST http://legacyupdate.net/v6/ClientWebService/client.asmx HTTP/1.1
Accept: text/xml
Content-Type: text/xml
Accept-Encoding: xpress
SOAPAction: "http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService/GetCookie"
User-Agent: Windows-Update-Agent
Host: legacyupdate.net
Content-Length: 1444
Proxy-Connection: Keep-Alive
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Body><GetCookie xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService"><authCookies xmlns:q1="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService" soapenc:arrayType="q1:AuthorizationCookie[2]"><AuthorizationCookie><PlugInId>PidValidator</PlugInId><CookieData>......
Even if change Accept-Encoding: xpress
to any other, the WSUS server still tries to return content, compressed with xpress encoding.
This error is caused by standard violation by LegacyUpdate servers, which are returning the WU cookes only via HTTP, compressed with xpress
algorithm. And it is not supported by System.Net.Http.HttpClient/SocketsHttpHandler/System.IO.Compression libraries, used by WebOne to connect to HTTP(S) servers. Opened a issue in Microsoft repo, waiting for response...
Haha, problem nr.3. Disabled proxy, tried to download some updates directly from LegacyUpdate, then enabled the proxy again and rebooted the virtual machine.
The cookie is still alive, but wuident.cab became too old. And on attempt to get it, we're get an new error:
2023-02-13 13:42:36:553 712 a24 Misc WARNING: GetServerFileSize failed. error 0x80072f76
2023-02-13 13:42:36:553 712 a24 Misc WARNING: WinHttp: IsFileToBeDownloaded failed with 0x80072f76
2023-02-13 13:42:36:553 712 a24 Misc WARNING: WinHttp: ShouldFileBeDownloaded failed with 0x80072f76
2023-02-13 13:42:36:553 712 a24 Misc WARNING: DownloadFileInternal failed for http://legacyupdate.net/v6/selfupdate/wuident.cab: error 0x80072f76
Looking to HTTP traffic...
HEAD http://legacyupdate.net/v6/selfupdate/wuident.cab?2302131042 HTTP/1.1
Accept: */*
User-Agent: Windows-Update-Agent
Host: legacyupdate.net
Proxy-Connection: Keep-Alive
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Via: HTTP/1.0 WebOne/0.15.1.0
Content-Type: application/octet-stream
Last-Modified: Sat, 08 May 2021 08:15:41 GMT
Accept-Ranges: bytes
Age: 779769
ETag: "609648ad-6b98"
Vary: Accept-Encoding
Server: cloudflare Microsoft-HTTPAPI/2.0
CF-Cache-Status: HIT
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=lyYoANAW3ZufubI2H9LibdjbukqHdK%2BBJ8vH3%2FDuhHcUIEswW8qlHGcQwXfOGq9Bn7MGhxfDL2olcl6%2F9c9JQXuqlAJpWnL33STifkrqnbJvAOWI%2FLB5T8kVj%2B2hM9Edp226aoL2JNMmWa%2Bf7XlS"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
CF-RAY: 798cf5c30b5d37dd-FRA
Alt-Svc: h3=":443"
Date: Mon, 13 Feb 2023 10:42:38 GMT
(and NO body at all)
Tried to do same via telnet. And found that real server also returns Content-Length: 27544
, but it is missing in WebOne HTTP response. Continuing to investigate.
Latest news. Fixed Range header support, fixed Content-Length loss, and made strange workaround for xpress
compression.
The last is experimental webone.conf [Server]
option AllowHttpCompression
. If set it to no
, it disables automatic decompression of HTTP traffic, and somewhy reanimates work of WSUS/LU. But also it disables any gzip/deflate/br compression on other sites, so currently it's have default value yes
(= all sites are fast, WSUS don't work).
Now at least LegacyUpdate is working correctly. Other WSUS servers also should.
What's happen?
When using WebOne together with Legacy Update on Windows 2000/XP (at least), updates are finding, but does not installing. Direct connection still working perfectly.
Looking into %windir%\WindowsUpdate.log:
In WebOne log the files are starting to download, but download stops quickly after beginning, because client aborted the transfer.
The problem is 0x80200011 (
The server did not return the file size. BITS only transfers static content and requires the HTTP server to return the Content-Length header. The transfer request fails if the URL points to dynamic content.
:link: ).Somewhy BITS service don't see Content-Legth HTTP header. By manual opening even in old MSIE, the files are downloading correctly.
I don't know if this a bug, because Microsoft saying that this is correct when using proxies: https://answers.microsoft.com/ru-ru/windows/forum/all/%D0%BD%D0%B5-%D0%BC%D0%BE%D0%B3%D1%83/15cfee6a-a978-423b-bfb2-b6be7c155e69 . :smiley:
In most of I've googled, guys saying that "don't use proxies for WU/WSUS", and only. But in one site there is a hint about reason of the problem: https://web.archive.org/web/20120506031042/http://forums.techarena.in/server-update-service/658623.htm :
And, yeah, WebOne is currently a HTTP 1.0 proxy. May be this is the reason of current incompatibility.
Workaround: Disable WebOne when using Legacy Update (Windows Update).
What's next? Try to modify WebOne to return HTTP/1.1 responses. If not successful, made proxy bypass for download.windowsupdate.com.