[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem with lua-curl
- From: Alexey Melnichuk <alexeymelnichuck@...>
- Date: Tue, 18 Apr 2017 14:15:12 +0300
Здравствуйте, Dirk.
Вы писали 17 апреля 2017 г., 17:23:47:
> If the server sends >16363 bytes, some bytes are lost.
> It looks as if all completed blocks of 16384 bytes are overwritten
> and only the remnant is passed through to to the user.
> I'll have a read in the source but I am sure bigger experts
> than me will beat me to the punch.
Just tested this code with download ~9M zip archive.
It has several sequence chunks series with size 16384.
All seems correct.
> local curl = require "cURL"
> local url = "https://github.com/fusionpbx/fusionpbx/archive/4.2.2.zip"
> local c = curl.easy{
> url = url,
> ssl_verifypeer = false,
> ssl_verifyhost = false,
> followlocation = true,
> }
> print(curl._NAME, curl._VERSION)
> print(curl.version())
> local f, i = assert(io.open('test.zip', 'w+b')), 0;
> c:setopt_writefunction(function(chunk)
> i = i + 1
> if (#chunk > 4096) then print(i, #chunk) end
> f:write(chunk)
> end)
> c:perform()
> f:close()
PS. Versions is:
* Lua-cURL 0.3.6-dev
* libcurl/7.49.0 OpenSSL/1.0.1c zlib/1.2.7 WinIDN
--
С уважением,
Alexey mailto:alexeymelnichuck@gmail.com
---
Это сообщение проверено на вирусы антивирусом Avast.
https://www.avast.com/antivirus