On 17 May 2018, at 10:20, Ulrike Fischer
wrote: Am Thu, 17 May 2018 09:39:47 +0200 schrieb Taco Hoekwater:
Or use luasocket, which is included in the luatex binary:
But I'm right that this works only with http and not with https?
Works ok for me. Did you test?
I tried a few links and always got 301 back regardless if they exist or not and thought due to the discussion two month ago on the luatex list about https content that it doesn't work at all.
I know found https://httpbin.org/ and with it the tests worked: https://httpbin.org/html gave 200 and https://httpbin.org/htmlxxxx gave 404.
It only works because it silently discards the https: and replaces
it with http: . Actually, it disregards what is in front of //
completely, whatever it is. Even:
url = "foobar://www.ntg.nl/watistex.html"
works just 'fine'.
Anyway, perhaps someone can answer me this? I tried the ffi/curl code,
and the network stuff works, but only when I comment out the write
callback:
lcurl.curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ffi.cast("callback",discard));
If I dont, I get an error message from ffi that is:
unable to convert argument 3 from cdata