SOLR-20 -- add a warning to SolrUpdateServlet if it is sent parameters

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@612896 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2008-01-17 18:01:36 +00:00
parent 63dfdc0d78
commit 7c4867c70d
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,12 @@ public class SolrUpdateServlet extends HttpServlet {
BufferedReader requestReader = request.getReader();
response.setContentType(QueryResponseWriter.CONTENT_TYPE_XML_UTF8);
if( request.getQueryString() != null ) {
log.warning(
"The @Deprecated SolrUpdateServlet does not accept query parameters: "+request.getQueryString()+"\n"
+" If you are using solrj, make sure to register a request handler to /update rather then use this servlet.\n"
+" Add: <requestHandler name=\"/update\" class=\"solr.XmlUpdateRequestHandler\" > to your solrconfig.xml\n\n" );
}
PrintWriter writer = response.getWriter();
legacyUpdateHandler.doLegacyUpdate(requestReader, writer);
}