lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject setting appropriate content-type
Date Wed, 12 Jul 2006 19:39:22 GMT
So, right now, the Solr servlet always sets a content type of
"text/xml;charset=UTF-8" before getting the Writer to write the

Now that we have other response writers (like JSON) it seems like they
need a say over what the content-type is.... so the new servlet code
would look something like this:

        QueryResponseWriter responseWriter =
responseWriter.getContentType(solrReq, solrRsp) );
        PrintWriter out = response.getWriter();
        responseWriter.write(out, solrReq, solrRsp);

So the new method is QueryResponseWriter.getContentType():String, and
I also pass the request and response so content-type could change
based on either of those.

Make sense?  Any other suggestions?


View raw message