curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Set Response Code for SFTP?

From: Christian Schmitz via curl-library <>
Date: Wed, 3 Apr 2024 14:54:46 +0200

> On 3. Apr 2024, at 14:49, Daniel Stenberg <> wrote:
> On Wed, 3 Apr 2024, Christian Schmitz via curl-library wrote:
>> Could this be changed, so SFTP also sets the field?
> What is a response code for SFTP?

Well, I would expect to find the error code from the SFTP library, so the application using lib curl could check for these error codes.

In libssh2.c we have sftp_libssh2_strerror function to provide a text for an error.
That error message is based on sftperr, which queries libssh2_sftp_last_error.

So the response code could provide the last error from SFTP library before it switches to state close.
To distinguish a problem uploading a file for whether disk is full, quota exceeded or the file name is invalid without parsing text.

Best regards,

Read our blog about news on our plugins:
Received on 2024-04-03