cURL / Mailing Lists / curl-library / Single Mail

curl-library

Trouble with libcurl vs. old/incomplete TFTP servers

From: Michael König <plasm_at_plasm.de>
Date: Mon, 17 Aug 2015 18:27:59 +0200 (CEST)

Hello everyone!

When trying to use libcurl with some embedded TFTP server implementation i ran
into trouble, due to faulty TFTP option handling.

In this case the server reported a transfer size of 0, instead of just omitting
the size, because it was unknown. This caused libcurl to do exactly nothing,
which was correct, but not what i hoped for.
The server behaved as intended, when the TFTP options were missing from the
read request.
To enable libcurl to do something like this i added a new option
"CURLOPT_TFTP_NO_OPTIONS" to curl_easy_setopt(), which when set to 1 omits
any TFTP options from read or write requests.

This is/was no libcurl bug. I just added a switch to enable libcurl users to
circumvent similarly broken servers in the future.

A patch against 7.41.0 (around noon GMT today) is included.

Thanks,
  Michael König

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2015-08-17