2011-08-05 79 views
0

當我使用--negotiate選項運行下面的curl命令時,出現以下錯誤。任何想法爲什麼?
關於curl命令驗證的問題

[Aug05 5:03am] [email protected]:/tmp/pradeep> curl --negotiate -u : -k --verbose --head "http://something.domain.com/something/soething.action"

About to connect() to something.domain.com port 80 (#0) 
Trying ip-address ... connected 
Connected to something.domain.com (ip-address) port 80 (#0) 
HEAD /something.action HTTP/1.1 
User-Agent: curl/7.21.6 (i386-pc-solaris2.10) libcurl/7.21.6 OpenSSL/0.9.8j zlib/1.2.3 
Host: something.domain.com 
Accept: */* 
< HTTP/1.1 401 Unauthorized 
HTTP/1.1 401 Unauthorized 
< Date: Fri, 05 Aug 2011 09:04:45 GMT 
Date: Fri, 05 Aug 2011 09:04:45 GMT 
< Server: Apache-Coyote/1.1 
Server: Apache-Coyote/1.1 
* gss_init_sec_context() failed: : KDC policy rejects requestWWW-Authenticate: Negotiate 
WWW-Authenticate: Negotiate 
< Set-Cookie: JSESSIONID=0E94E134D7401632EBB4D042B8934DCD; Path=/ 
Set-Cookie: JSESSIONID=0E94E134D7401632EBB4D042B8934DCD; Path=/ 
< Content-Type: text/plain 
Content-Type: text/plain 
* no chunk, no close, no size. Assume close to signal end 

我能夠從瀏覽器等正常打開網站我爲什麼我不能在這裏進行驗證?有人可以幫助我瞭解

回答

0

有兩件事情可以嘗試:

  1. 刪除--head。您似乎想要發送GET請求,而不是HEAD請求。

  2. 不要忘了提供憑據像這個例子:-u皮埃爾:祕密