【发布时间】:2018-03-11 23:43:21
【问题描述】:
我正在尝试从服务器获取 xml 响应,但我得到了这个:SPNEGO 找不到协商机制
你们知道怎么做吗?
$ curl http://example.com:86/DynamicsNAV80/WS/nasr/Page/Delivery -v --ntlm --negotiate -u nasr\\jason:tty5Rx53$_sj
* Hostname was NOT found in DNS cache
* Trying 21.55.152.170...
* Connected to example.com (21.55.152.170) port 86 (#0)
> GET /DynamicsNAV80/WS/nasr/Page/Delivery HTTP/1.1
> User-Agent: curl/7.38.0
> Host: example.com:86
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
* Server Microsoft-HTTPAPI/2.0 is not blacklisted
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate
< Date: Sun, 11 Mar 2018 23:20:34 GMT
<
* Connection #0 to host example.com left intact
* Issue another request to this URL: 'http://example.com:86/DynamicsNAV80/WS/nasr/Page/Delivery'
* Found bundle for host example.com: 0x5558f1e0d4e0
* Re-using existing connection! (#0) with host example.com
* Connected to example.com (21.55.152.170) port 86 (#0)
> GET /DynamicsNAV80/WS/nasr/Page/Delivery HTTP/1.1
> User-Agent: curl/7.38.0
> Host: example.com:86
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
* Server Microsoft-HTTPAPI/2.0 is not blacklisted
< Server: Microsoft-HTTPAPI/2.0
* gss_init_sec_context() failed: : SPNEGO cannot find mechanisms to negotiate
< WWW-Authenticate: Negotiate
< Date: Sun, 11 Mar 2018 23:20:34 GMT
<
* Connection #0 to host example.com left intact
【问题讨论】:
标签: authentication curl ntlm