Bug 49883

Summary: curl --fail возвращает код ошибки 56 вместо 22
Product: Sisyphus Reporter: Nikolai Zurabishvili <zurabishvilinn>
Component: curlAssignee: Anton Farygin <rider>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: egori, glebfm, ldv, rider, shaba
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Nikolai Zurabishvili 2024-04-03 15:45:34 MSK
curl-8.7.1-alt1

Стенды (обновлены до сизифа):

KWorkstation 10.2.1 x86-64
Workstation 10.2 x86-64
Education 10.2 KDE x86-64
Education 10.2 x86-64
Server 10.2 office x86-64

Шаги:
1. $ curl https://www.booleanworld.com/404 -fsSo file.txt; echo $?

Фактический результат: curl: (56) The requested URL returned error: 404
56

Ожидаемый результат: curl: (22) The requested URL returned error: 404
22

Доп: $ curl --fail-with-body https://www.booleanworld.com/404 -sSo file.txt; echo $? возвращает корректный код ошибки : curl: (22) The requested URL returned error: 404
22

В апстриме не воспроизводится
Comment 1 Nikolai Zurabishvili 2024-04-03 15:55:11 MSK
из $ man curl:
...
22     HTTP page not retrieved. The requested URL was not found or returned another error with the HTTP  error  code  being  400  or above. This return code only appears if -f, --fail is used.
...
56     Failure in receiving network data.