I suspect there is a bug on http-header-field argument for fetch command, maybe it is not sent correctly (I didn't check this over local web server to analyse), download data is always 64512 bytes regardles which range is set in header when output=user as-value:
when output=file it downloads whole file:
This indicates that Range header is not sent correctly.
Using curl is ok:
Code:
:put [:len ([/tool fetch url="https://public-dns.info/nameservers-all.txt" http-header-field="Range: bytes=0-1" output=user as-value]->"data")]64512
Code:
/tool fetch url="https://public-dns.info/nameservers-all.txt" http-header-field="Range: bytes=0-1" output=file:delay 3:put [get "nameservers-all.txt" size]1396869
Using curl is ok:
Code:
curl -s -H 'Range: bytes=0-1' https://public-dns.info/nameservers-all.txt | wc -c2
Statistics: Posted by optio — Sat Mar 30, 2024 6:53 pm