tsneterr: (3) URL using bad/illegal format or missing URL

Alex Tweedly alex at tweedly.net
Sun Dec 17 06:22:30 EST 2023


On 16/12/2023 14:51, Klaus major-k via use-livecode wrote:
> Hi friends,
>
> I am trying to upload a (not so long) urlencoded text list
> to my server, but get the tsNet error as in the subject.
>
> In the form of:
> ...
> ## Remove spaces etc.
> put clean_name(tSetlist) into tDateiname
> put "whatever" & CR & urlencode(fld "setlist") into tInhalt
> put "https://www.MYSERVER.de/setlists.lc?name=" & tDateiname & "&setlist=" & tInhalt into tUrl
> ...
> ...
>
> The error comes from LC and NOT from the server, tAnwort = EMPTY!
>
> The URL is definitively correct!
> Is the urlencoded string in tInhalt too long for a parameter?
> Or is a CR in that parameter not a good idea?

The CR in the parameter is a bad idea.

Instead of

put "whatever" & CR & urlencode(fld "setlist") into tInhalt

would you not be better doing

put urlencode("whatever" &CR & fld "setlist") into tInhalt


(I can't reproduce the error here, so I can't be sure if this fixes it 
or not - but the CR in the url is definitely a bad idea).


Alex.





More information about the use-livecode mailing list