curl / Mailing Lists / curl-users / 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: How to trouble shoot "code 407 from proxy after CONNECT"

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 30 Aug 2022 12:54:30 +0200 (CEST)

On Tue, 30 Aug 2022, Walter via curl-users wrote:

> After typing the password curl negotiates with the proxy, but eventually
> exits with:
>
> curl: (56) Received HTTP code 407 from proxy after CONNECT
>
> This type of fetch did work in the past, but something on the proxy side
> must have changed (the password is correct though). So now I get this proxy
> error.
>
> How can I trouble shoot this problem?

It can be tricky.

The 407 response is used for proxies both for temporary "handshake responses"
but also for "you are not authenticated" responses. In the case of NTLM, it
needs one or two 407s back before it is supposed to succeed.

Make sure that the Proxy-authenticate headers you receive back from the proxy
states that it wants NTLM.

If possibly, investigate what the proxy itself logs for this traffic. NTLM is
a fairly complicated protocol that sends encrypted data, so it's hard to
follow and manually inspect and verify that things are correct over the wire.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-08-30