#1 Re: mORMot 2 » MGet fails silently if Content-Length unknown » 2024-01-03 17:58:44

Thanks Arnaud, I can confirm the fix works:

D:\mORMot\src\tools\mget\Win32\Debug\Output>mget https://www.simplysup.com/download/dl/trjsetup.exe /debug
20240103 17504852  ! info  SetThreadName 4fc0=Main
20240103 17504852  !  +    mormot.tools.mget.TMGetProcess(03122b30).Execute https://www.simplysup.com/download/dl/trjsetup.exe
20240103 17504858  ! trace      mormot.net.client.THttpClientSocket(030affe0) open(www.simplysup.com:443) sock=0268 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 TLSv1.2
20240103 17504858  ! trace      mormot.net.client.THttpClientSocket(030affe0) WGet download/dl/trjsetup.exe: start downloading D:\mORMot\src\tools\mget\Win32\Debug\Output\trjsetup.exe.part
20240103 17504858  ! trace      mormot.net.client.THttpClientSocket(030affe0) RequestInternal GET www.simplysup.com:443//download/dl/trjsetup.exe flags= retry=0
20240103 17504861  ! trace      mormot.net.client.THttpClientSocket(030affe0) GetHeader   flags=ptk len=-1 application/x-msdownload
20240103 17504861  ! trace      mormot.core.buffers.TStreamRedirect(0303de90) trjsetup.exe 25.7KB read 547.9KB/s ...
20240103 17504961  ! trace      mormot.core.buffers.TStreamRedirect(0303de90) trjsetup.exe 7.3MB read 7MB/s ...
20240103 17505061  ! trace      mormot.core.buffers.TStreamRedirect(0303de90) trjsetup.exe 13.7MB read 6.7MB/s ...
20240103 17505161  ! trace      mormot.core.buffers.TStreamRedirect(0303de90) trjsetup.exe 20.1MB read 6.6MB/s ...
20240103 17505201  ! trace      mormot.net.client.THttpClientSocket(030affe0) GetBody len=21425456
20240103 17505201  ! trace      mormot.net.client.THttpClientSocket(030affe0) RequestInternal status=200 keepalive=30000 flags=ptk in 3.09s
20240103 17505201  ! trace      mormot.core.buffers.TStreamRedirect(0303de90) trjsetup.exe 20.4MB done in 3.07s ( 6.6MB/s )
20240103 17505201  ! trace      mormot.tools.mget.TMGetProcess(03122b30) Execute: WGet=D:\mORMot\src\tools\mget\Win32\Debug\Output\trjsetup.exe
20240103 17505201  !  -    03.176.051

#2 mORMot 2 » MGet fails silently if Content-Length unknown » 2024-01-03 01:45:57

NigelThomas
Replies: 9

One of my servers, proxied by Cloudflare, doesn't return Content-Length when queried (I don't know why, that's a whole other ball of fluff). When I attempt downloading a file from that server with MGet the download fails but there is no error indication, just a zero-length file created locally.

Debug output:

D:\mORMot\src\tools\mget\Win32\Debug\Output>mget https://www.simplysup.com/download/dl/trjsetup.exe /debug
20240103 01420959  ! info  SetThreadName 3ae4=Main
20240103 01420959  !  +    mormot.tools.mget.TMGetProcess(02f52a40).Execute https://www.simplysup.com/download/dl/trjsetup.exe
20240103 01421001  ! trace      mormot.net.client.THttpClientSocket(02edffe0) open(www.simplysup.com:443) sock=0268 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 TLSv1.2
20240103 01421001  ! trace      mormot.net.client.THttpClientSocket(02edffe0) WGet download/dl/trjsetup.exe: start downloading D:\mORMot\src\tools\mget\Win32\Debug\Output\trjsetup.exe.part
20240103 01421001  ! trace      mormot.net.client.THttpClientSocket(02edffe0) RequestInternal GET www.simplysup.com:443//download/dl/trjsetup.exe flags= retry=0
20240103 01421003  ! trace      mormot.net.client.THttpClientSocket(02edffe0) GetHeader   flags=ptk len=-1 application/x-msdownload
20240103 01421003  ! trace      mormot.net.client.THttpClientSocket(02edffe0) RequestInternal status=200 keepalive=30000 flags=ptk in 43.08ms
20240103 01421003  ! trace      mormot.tools.mget.TMGetProcess(02f52a40) Execute: WGet=D:\mORMot\src\tools\mget\Win32\Debug\Output\trjsetup.exe
20240103 01421003  !  -    00.105.011

WGet (1.21.1) downloads the file OK.

Board footer

Powered by FluxBB