mirror of https://github.com/apache/lucene.git
SOLR-267: Reopen. Remove adding info to the HTTP Header. Remove double responseHeader in the namedList response
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@649185 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f0a4b30cdc
commit
d6839a0414
|
@ -357,6 +357,7 @@ Bug Fixes
|
||||||
|
|
||||||
27. SOLR-267: Changed logging to report number of hits, and also provide a mechanism to add log messages to be output by the SolrCore via a NamedList toLog
|
27. SOLR-267: Changed logging to report number of hits, and also provide a mechanism to add log messages to be output by the SolrCore via a NamedList toLog
|
||||||
member variable. (Will Johnson, yseeley, gsingers)
|
member variable. (Will Johnson, yseeley, gsingers)
|
||||||
|
SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers)
|
||||||
|
|
||||||
28. SOLR-509: Moved firstSearcher event notification to the end of the SolrCore constructor (Koji Sekiguchi via gsingers)
|
28. SOLR-509: Moved firstSearcher event notification to the end of the SolrCore constructor (Koji Sekiguchi via gsingers)
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@ public class SolrQueryResponse {
|
||||||
***/
|
***/
|
||||||
|
|
||||||
public SolrQueryResponse() {
|
public SolrQueryResponse() {
|
||||||
add("responseHeader", new SimpleOrderedMap<Object>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,12 +42,12 @@ public class JSONWriterTest extends AbstractSolrTestCase {
|
||||||
rsp.add("data2", Double.NEGATIVE_INFINITY);
|
rsp.add("data2", Double.NEGATIVE_INFINITY);
|
||||||
rsp.add("data3", Float.POSITIVE_INFINITY);
|
rsp.add("data3", Float.POSITIVE_INFINITY);
|
||||||
w.write(buf, req, rsp);
|
w.write(buf, req, rsp);
|
||||||
assertEquals(buf.toString(), "{'responseHeader':{},'data1':float('NaN'),'data2':-float('Inf'),'data3':float('Inf')}");
|
assertEquals(buf.toString(), "{'data1':float('NaN'),'data2':-float('Inf'),'data3':float('Inf')}");
|
||||||
|
|
||||||
w = new RubyResponseWriter();
|
w = new RubyResponseWriter();
|
||||||
buf = new StringWriter();
|
buf = new StringWriter();
|
||||||
w.write(buf, req, rsp);
|
w.write(buf, req, rsp);
|
||||||
assertEquals(buf.toString(), "{'responseHeader'=>{},'data1'=>(0.0/0.0),'data2'=>-(1.0/0.0),'data3'=>(1.0/0.0)}");
|
assertEquals(buf.toString(), "{'data1'=>(0.0/0.0),'data2'=>-(1.0/0.0),'data3'=>(1.0/0.0)}");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,14 +273,15 @@ public class SolrDispatchFilter implements Filter
|
||||||
*/
|
*/
|
||||||
this.execute( req, handler, solrReq, solrRsp );
|
this.execute( req, handler, solrReq, solrRsp );
|
||||||
// add info to http headers
|
// add info to http headers
|
||||||
try {
|
//TODO: See SOLR-232 and SOLR-267.
|
||||||
|
/*try {
|
||||||
NamedList solrRspHeader = solrRsp.getResponseHeader();
|
NamedList solrRspHeader = solrRsp.getResponseHeader();
|
||||||
for (int i=0; i<solrRspHeader.size(); i++) {
|
for (int i=0; i<solrRspHeader.size(); i++) {
|
||||||
((javax.servlet.http.HttpServletResponse) response).addHeader(("Solr-" + solrRspHeader.getName(i)), String.valueOf(solrRspHeader.getVal(i)));
|
((javax.servlet.http.HttpServletResponse) response).addHeader(("Solr-" + solrRspHeader.getName(i)), String.valueOf(solrRspHeader.getVal(i)));
|
||||||
}
|
}
|
||||||
} catch (ClassCastException cce) {
|
} catch (ClassCastException cce) {
|
||||||
log.log(Level.WARNING, "exception adding response header log information", cce);
|
log.log(Level.WARNING, "exception adding response header log information", cce);
|
||||||
}
|
}*/
|
||||||
if( solrRsp.getException() != null ) {
|
if( solrRsp.getException() != null ) {
|
||||||
sendError( (HttpServletResponse)response, solrRsp.getException() );
|
sendError( (HttpServletResponse)response, solrRsp.getException() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue