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: FTP error 426 not handled?

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 19 Feb 2020 09:08:25 +0100 (CET)

On Tue, 18 Feb 2020, Christian Schmitz via curl-library wrote:

> First case wit error 426:
>
> We are completely uploaded and fine
> Remembering we are in dir "files/"
> TLSv1.3 (OUT), TLS alert, close notify (256):
> 426 Failure reading network stream.
> server did not report OK, got 426

I think it feels wrong to treat a 4xx error response code as if it was
actually OK. The server says there's an error, should curl not report that as
an error?

Googling for FTP error 426 we can see it used for connection closed errors so
I suspect that we cannot even know that it is benign based on this exact
number...

> Second log with no response:
>
> We are completely uploaded and fine
> Remembering we are in dir "files/"
> TLSv1.3 (OUT), TLS alert, close notify (256):
> FTP response timeout
> control connection looks dead
> Closing connection 0
> TLSv1.3 (OUT), TLS alert, close notify (256):

...

> Maybe CURL should handle a closed data connection after uploading as being
> fine?

If the server doesn't tell us the upload is fine (as it should per the
protocol), how can curl tell that it is?

I wouldn't mind providing enough information to the application so that it can
make decisions on when to ignore problems like this for cases when you have
additional information or clues that allows you to draw further conclusions -
but I don't think we can make that the default behavior for curl for these
cases.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-02-19