SOLR-335: work-around in lieu of PingRequestHandler

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@574605 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William Au 2007-09-11 14:18:03 +00:00
parent 2b25ec85ef
commit 7f54a7c94e
1 changed files with 14 additions and 2 deletions

View File

@ -63,11 +63,23 @@ public abstract class SolrResponseBase implements SolrResponse
// these two methods are based on the logic in SolrCore.setResponseHeaderValues(...)
public int getStatus() {
return (Integer) getResponseHeader().get("status");
NamedList header = getResponseHeader();
if (header != null) {
return (Integer) header.get("status");
}
else {
return 0;
}
}
public int getQTime() {
return (Integer) getResponseHeader().get("QTime");
NamedList header = getResponseHeader();
if (header != null) {
return (Integer) header.get("QTime");
}
else {
return 0;
}
}
public String getRequestUrl() {