2

Yes, this question has already been asked and answered here years ago.

My only problem that the answer doesn't match the reality. The FTP-connection should be reused, but it isn't. My curl version is 7.44.0 32/64 bit, OS: linux/AIX. Both verbose mode and tcpdump proves that a new connection is opened for every file-upload. Plus there is this part in url.c:

/*
 * IsPipeliningPossible() returns TRUE if the options set would allow
 * pipelining/multiplexing and the connection is using a HTTP protocol.
 */
static bool IsPipeliningPossible(const struct SessionHandle *handle,
                                 const struct connectdata *conn)
  /* If a HTTP protocol and pipelining is enabled */
  if(conn->handler->protocol & PROTO_FAMILY_HTTP) {

which prevents FTP protocol from reusing the same connection.

Community
  • 1
  • 1
Lorinczy Zsigmond
  • 1,749
  • 1
  • 14
  • 21

1 Answers1

2

As you pointed out by citing the source code, you'll have to just fix libcurl; as you already found the place to start, why don't you do that? Adding functionality that you need yourself is one of the great strengths of the free and open source software model.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
  • Tanks; I did so, but it wasn't enough... Plus, it wasn't my first problem with libcurl (https://github.com/bagder/curl/issues/453), also I had problems with 32/64-bit incompatibility in curl/curlbuild.h; so right now I am seriously thinking on moving to this product: http://nbpfaus.net/~pfau/ftplib/ – Lorinczy Zsigmond Sep 25 '15 at 16:19