Erik Hatcher wrote:

On May 5, 2007, at 6:14 AM, Erik Hatcher wrote:
This works fine on an older (trunk at some point a month or two ago) version of Solr (in Ruby code):

Net::HTTP.new('localhost',8888).post("/solr/select", "wt=ruby&q=rossetti", { "Content-Type" => "application/x-www-form-urlencoded; charset=utf-8" }).body

But on trunk I get an error that the q parameter is missing. POST parameters are being ignored.

Help! What happened? I'm going to go back and review the changes that have been made lately, and maybe there is something I need to change in the config?

Ok, I changed to handleSelect="false" in solrconfig:

    <requestDispatcher handleSelect="false">

And it now works. But I'm confused about the handleSelect switch. I'm staring at the code where it's used in SolrDispatchFilter now and don't understand what's going on yet or why we need this switch.

Ryan?


Currently the RequestDispatcher and SolrServlet can take care of "/select" -- the RequestDispatcher has slightly different ways to parse requests and spits out errors slightly different then SolrServlet.

the handleSelect="false" lets you choose what behavior you want from solrconfig.xml

----------

All that said, you found a bug!

[line 370] SolrRequestParsers.parseParamsAndFillStreams() looks at the request and figures out how to parse it.

I gets the content type and compares it to "application/x-www-form-urlencoded"

Since your content includes the charset, it dose not match where it should.

I'll post a change shortly.

ryan


Reply via email to