mirror of https://github.com/apache/lucene.git
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:
parent
63dfdc0d78
commit
7c4867c70d
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue