From 7c4867c70d165b8bc158ac1978be4aa50755ead7 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 17 Jan 2008 18:01:36 +0000 Subject: [PATCH] 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 --- .../src/org/apache/solr/servlet/SolrUpdateServlet.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/webapp/src/org/apache/solr/servlet/SolrUpdateServlet.java b/src/webapp/src/org/apache/solr/servlet/SolrUpdateServlet.java index 15608dd54a3..2f278d2ca49 100644 --- a/src/webapp/src/org/apache/solr/servlet/SolrUpdateServlet.java +++ b/src/webapp/src/org/apache/solr/servlet/SolrUpdateServlet.java @@ -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: to your solrconfig.xml\n\n" ); + } PrintWriter writer = response.getWriter(); legacyUpdateHandler.doLegacyUpdate(requestReader, writer); }