tftp: check for trailing ";mode=" in URL without strstr

RFC 3617 defines two specific modes, "netascii" and "octet". This code
now checks only for those trailing ones - and not in the hostname since
they can't be there anymore.

Assisted-by: Jay Satiro
Closes #19070
This commit is contained in:
Daniel Stenberg 2025-10-15 08:42:20 +02:00
parent 5ac3541cb4
commit be852e39b2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 18 additions and 33 deletions

View file

@ -25,10 +25,10 @@ returned
tftp
</server>
<name>
TFTP retrieve with mode=i
TFTP retrieve with mode=octet
</name>
<command>
"tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER;mode=i" --use-ascii
"tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER;mode=octet" --use-ascii
</command>
</client>