Curl kerberos delegation sometimes return 401. But it needs to log in?

Hi all.
For the forwarding of queries from a php application on Linux to Windows internal company services using php curl, and delegation. In principle, in 90% of cases works fine. But sometimes there are troubles, instead of the authentication curl_exec returns 401! Looking at the network activity using fiddler to observe that with the running-as-necessary query there are two query
1. Linux->Windows->return 401
2. Linux (Authorization: Negotiate NNNN)->Windows->return 200

And in the not-working-as-necessary the curl refuses to complete step 2 and returns client a 401, without attempting to complete step 2.

Not have you encountered this problem?

PS
Trying to catch 401 in php and preauthenticate again does not lead to the desired result. Still 401 (tried up to 10 retries), for example:
0a9b917076964884b37a7dd566afd465.png

Update:
Curl in PHP is not working correctly. I had stupidly call as curl command in shell. It worked.
July 2nd 19 at 17:56
0 answer

Find more questions by tags KerberosWeb DevelopmentPHP