Skip to content

Commit 141f5ac

Browse files
authored
Merge pull request #149 from moteus/master
Support new options from 7.65.1
2 parents cb29348 + 6e42dec commit 141f5ac

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ shallow_clone: true
77

88
environment:
99
LR_EXTERNAL: c:\external
10-
CURL_VER: 7.64.0
10+
CURL_VER: 7.65.1
1111

1212
matrix:
1313
- LUA: "lua 5.1"

src/lcopteasy.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ OPT_ENTRY( interface, INTERFACE, STR, LCURL_STORE_ST
8888
OPT_ENTRY( localport, LOCALPORT, LNG, 0, LCURL_DEFAULT_VALUE )
8989
OPT_ENTRY( localportrange, LOCALPORTRANGE, LNG, 0, 1 )
9090
OPT_ENTRY( dns_cache_timeout, DNS_CACHE_TIMEOUT, LNG, 0, 60 )
91+
92+
#if !LCURL_CURL_VER_GE(7,65,0)
9193
OPT_ENTRY( dns_use_global_cache, DNS_USE_GLOBAL_CACHE, LNG, 0, LCURL_DEFAULT_VALUE )
94+
#endif
95+
9296
#if LCURL_CURL_VER_GE(7,25,0)
9397
OPT_ENTRY( dns_servers, DNS_SERVERS, STR, LCURL_STORE_STRING, LCURL_DEFAULT_VALUE )
9498
#endif
@@ -461,6 +465,10 @@ OPT_ENTRY(upload_buffersize, UPLOAD_BUFFERSIZE, LNG, 0, 64 * 1024)
461465
OPT_ENTRY(http09_allowed, HTTP09_ALLOWED, LNG, 0, 0)
462466
#endif
463467

468+
#if LCURL_CURL_VER_GE(7,65,0)
469+
OPT_ENTRY(maxage_conn, MAXAGE_CONN, LNG, 0, LCURL_DEFAULT_VALUE)
470+
#endif
471+
464472
//{ Restore system macros
465473

466474
#ifdef LCURL__TCP_FASTOPEN

src/lcopturl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ENTRY_PART(query, UPART_QUERY , CURLUE_NO_QUERY )
88
ENTRY_PART(scheme, UPART_SCHEME , CURLUE_NO_SCHEME )
99
ENTRY_PART(url, UPART_URL , CURLUE_OK )
1010
ENTRY_PART(user, UPART_USER , CURLUE_NO_USER )
11+
ENTRY_PART(zoneid, UPART_ZONEID , CURLUE_UNKNOWN_PART )
1112

1213
ENTRY_FLAG(DEFAULT_PORT )
1314
ENTRY_FLAG(NO_DEFAULT_PORT )

test/test_urlapi.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,22 @@ end)
211211
-- assert_equal("http://example.com/?a=hello+world", url:get_url())
212212
-- end)
213213

214+
if curl.UPART_ZONEID then
215+
216+
it('should returns zoneid', function()
217+
url = scurl.url('http://[fe80:3438:7667:5c77:ce27%18]:3800')
218+
assert_equal('18', url:get_zoneid())
219+
end)
220+
221+
it('should returns empty on missing zoneid', function()
222+
url = scurl.url('http://[fe80:3438:7667:5c77:ce27]:3800')
223+
assert_equal(curl.null, url:get_zoneid())
224+
end)
225+
226+
else
227+
test_zoneid = skip_case('URL API supports zoneid since version 7.65.0')
228+
end
229+
214230
end end
215231

216232
local _ENV = TEST_CASE'curlu parameter' if ENABLE then

0 commit comments

Comments
 (0)