String lengths

Hi,

I am writing a script that fetches the latest release note and forwards and excerpt to a server backend, put I am struggling with no text showing of the release note is long.

An example:

tool/fetch  http://upgrade.mikrotik.com/routeros/7.12beta7/CHANGELOG
:put [file/get CHANGELOG contents ]

Results in no output, while if doing the same with a (much) shorter release note it works:

tool/fetch  http://upgrade.mikrotik.com/routeros/7.11.2/CHANGELOG
:put [file/get CHANGELOG contents ]

Results in the release note being shown as expected.

I suspect that I am running in to some limitation of ROS string lengths, but I am not sure if I somehow can work around this.

Any suggestions are much appreciated! :slight_smile:

The problem is not the variable but that fetch retrieves up 64KB and then you have to use chunking if you want more data.

Why uselessly do that?
Simply the backend read https://upgrade.mikrotik.com/routeros/7.12beta7/CHANGELOG

I agree that it would be more efficient to let the backend handle it. But the backend is beyond my control.

I got it working using this approach:

global test [/tool/fetch "http://upgrade.mikrotik.com/routeros/7.12beta9/CHANGELOG" output=user as-value]

Instead of having the intermediate step where it is stored as a file.