cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Different behaviour of file upload with NTLM/Negotiate proxy authentication

From: Markus Moeller <huaraz_at_moeller.plus.com>
Date: Wed, 7 Nov 2012 20:35:15 -0000

"Daniel Stenberg" <daniel_at_haxx.se> wrote in message
news:alpine.DEB.2.00.1211070921200.17392_at_tvnag.unkk.fr...
> On Tue, 6 Nov 2012, Markus Moeller wrote:
>
>> Unfortunateley that does not work. When I use --anyauth alone curl tries
>> BASIC auth and the proxy return auth required as only NTLM and Negotiate
>> are supported. After tht curl gives up.
>
>> /opt/curl-7.28/bin/curl -v -A "| MSIE |" -U "DOMAIN\user" --anyauth
>
> This is you providing _proxy_ credentials and then saying you want _host_
> authentication. If you want to do proxy authentication you'd
> use --proxy-anyauth as it is separate from host.
>

Unfortunately it does not work with --proxy-anyauth either. As not all
methods are tried. I see

* gss_init_sec_context() failed: : No credentials cache found

for the Negotiate attempt, but then there is no NTLM attampt afterwards
despite the proxy offering both.

> /opt/curl-7.28/bin/curl -v -A "| MSIE |" -U
> "DOMAIN\user" --proxy-anyauth --form file_upload=@/tmp/dummy.docx --form
> do=test --form subdo=file_upload --form http_submit="Start HTTP upload"
> http://www.csm-testcenter.org/test
Enter proxy password for user 'DOMAIN\user':
* About to connect() to proxy proxy.domain.com port 8080 (#0)
* Trying 192.168.1.200...
* connected
* Connected to proxy.domain.com (192.168.1.200) port 8080 (#0)
> POST http://www.csm-testcenter.org/test HTTP/1.1
> User-Agent: | MSIE |
> Host: www.csm-testcenter.org
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 20347
> Expect: 100-continue
> Content-Type: multipart/form-data;
> boundary=----------------------------e119f4bc3cf3
>
< HTTP/1.1 100 Continue
< HTTP/1.1 407 authenticationrequired
< Content-Type: text/html
< Cache-Control: no-cache
< Content-Length: 3407
< Proxy-Connection: Keep-Alive
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: NTLM
* HTTP error before end of send, stop sending
<
* Closing connection #0
* Issue another request to this URL: 'http://www.csm-testcenter.org/test'
* About to connect() to proxy proxy.domain.com port 8080 (#0)
* Trying 192.168.1.200...
* connected
* Connected to proxy.domain.com (192.168.1.200) port 8080 (#0)
> POST http://www.csm-testcenter.org/test HTTP/1.1
> User-Agent: | MSIE |
> Host: www.csm-testcenter.org
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 20347
> Expect: 100-continue
> Content-Type: multipart/form-data;
> boundary=----------------------------b1110a70baac
>
< HTTP/1.1 100 Continue
< HTTP/1.1 407 authenticationrequired
< Content-Type: text/html
< Cache-Control: no-cache
< Content-Length: 3407
< Proxy-Connection: Keep-Alive
* gss_init_sec_context() failed: : No credentials cache found
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: NTLM
* HTTP error before end of send, stop sending
<
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

..
</html>
* Closing connection #0

> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

Markus

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-11-07