1

参照用のコード ブロックを以下に示します。

String hostname = "Hostname Value";
URI uri = new URI(hostname + "/solr/add/story/" + story.getId() + ".html");
final HTTPConnection con = new HTTPConnection(uri);
con.setAllowUserInteraction(false);
final HTTPResponse response = con.Get(uri.getPathAndQuery());

ここで、応答にアクセスしているときに、例外を下回っています。

[ WARN] [com.thestreet.cms.integration.solr.SolrService] 12/02/2013 22:52:54-Unable                       
update front end search engine index with story 10446446 
java.net.ProtocolException: Bad Set-Cookie header: FV=OID-|PID-|MID-|PUC-|DATE-         
529D5595; path=/; expires=Tue, 01-Jan-2035 00:00:00 GMT; domain=.thestreet.com;,       
BRIS=C0.A8.41.91|529D55951FB74EF; path=/; expires=Tue, 01-Jan-2035 00:00:00 GMT;     
domain=.thestreet.com;, 
RGIS=-1386042773,192.168.65.145,BA42A8C0,1076F795713A21E010941898-    0-1386042773-; 
path=/; expires=Tue, 01-Jan-2035 00:00:00 GMT; domain=.thestreet.com;,     
JSESSIONID=8A8A377CF937F6184D3F4774CC6F4CBA; Version=1; Path="/"; HttpOnly 
No '=' found for token starting at position 432 
at HTTPClient.Cookie.parse(Cookie.java:243) 
at HTTPClient.CookieModule.handleCookie(CookieModule.java:454) 
at HTTPClient.CookieModule.responsePhase1Handler(CookieModule.java:403) 
at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:724) 
at HTTPClient.HTTPResponse.getStatusCode(HTTPResponse.java:190) 
at com.thestreet.cms.integration.solr.SolrService$1.run(SolrService.java:450) 
at java.lang.Thread.run(Thread.java:722)

これは、キーと値のペアの形式ではないため、Cookie ヘッダーの Httponly ビットが原因のようです。応答の読み取り中に Cookie ヘッダーまたは Cookie チェックを回避する方法はありますか? 助けてください。

前もって感謝します。

4

1 に答える 1