cURL / Mailing Lists / curl-library / Single Mail


Re: TFTP error scenario not closing connection in curl 7.19.4

From: Daniel Stenberg <>
Date: Fri, 24 Apr 2009 23:51:32 +0200 (CEST)

On Mon, 30 Mar 2009, vijay g wrote:

> In tftp.c in the curl lib 7.19.4, whenever there is any error in TFTP, it is
> better to close the connection. In ftp.c, its being done in the same way.
> "conn->bits.close = TRUE; " should be called in tftp_do() in if(state->error
> != TFTP_ERR_NONE) to resolve this issue.

I played a bit with this problem tonight - known as bug #2723219 in the
tracker. It's easily reproducable with test case 1099 that I've just committed
(disabled by default).

The proper solution is not to close due to this error. Either we should

  A) make it survive "file not found" errors and the second request (on a
     re-used "connection") should just work


  B) stop doing "connection re-use" for UDB-based protocols as there's very
     little gain anyway

I had a quick attempt at (A) just now, but I've not managed to do so just yet,
and I figure if perhaps solution (B) isn't the right thing to do anyway...

I'm interested in hearing what others think!

Received on 2009-04-25