HttpHead を使用して顧客の Web サイトから情報を取得していますが、何らかの理由で応答にも Cookie が含まれています。それは期待されていますか?Cookieを返さないように設定する方法はありますか?
以下は私たちが持っているコードです
HttpClient httpclient = new DefaultHttpClient();
// the time it takes to open TCP connection.
httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, this.timeout);
// timeout when server does not send data.
httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, this.timeout);
// the head method
HttpHead httphead = new HttpHead(url);
HttpResponse response = httpclient.execute(httphead);
また、応答とともに Cookie が返されたことを示す次の警告が表示されます。
[警告] ResponseProcessCookies - Cookie が拒否されました: "[バージョン: 0][名前: DXFXFSG][値: AUR][ドメイン: ...省略...][パス: /][有効期限: null]". ドメイン属性「...省略...」が不正です。元のドメイン: 「...省略...」