Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some special characters on request aren't accepted by tomcat #197

Open
jaarandaz opened this issue Mar 27, 2017 · 3 comments
Open

Some special characters on request aren't accepted by tomcat #197

jaarandaz opened this issue Mar 27, 2017 · 3 comments

Comments

@jaarandaz
Copy link

jaarandaz commented Mar 27, 2017

I'm using Tomcat ver 7.0.52.0 and it is failing when accesing to

/solr/unience/select?q=best&defType=dismax&qf=s_name^1.3%20s_shortName^1.4%20s_isin^1.5%20s_managementCompany^1.2&start=0&rows=10&wt=json

but it works when accessing to

/solr/unience/select?q=best&defType=dismax&qf=s_name%5E1.3%20s_shortName%5E1.4%20s_isin%5E1.5%20s_managementCompany%5E1.2&start=0&rows=10&wt=json

Is there any configuration option to be sure "^" becomes %5E" on the request? Thank you

@nicolasembleton
Copy link
Collaborator

Yeah, it's the only characted that isn't being encoded because of this library: https://github.com/Gozala/querystring/blob/master/encode.js#L49
And that the '^' character is being used as the equal character for stringification: https://github.com/lbdremy/solr-node-client/blob/master/lib/query.js#L588

To have it %5E-ed, you'll need to replace that '^' everywhere in the code to '%5E'. I suppose that'd make sense too.

On the other hand, I never saw anyone complaining about that either so I'm wondering why this version of Tomcat is behaving? Anyone had trouble like this one?

@josuehd
Copy link

josuehd commented Nov 10, 2017

yeah, I'm having the same issue using tomcat 7.0.76

@julianlam
Copy link
Collaborator

FWIW, still seeing this with tomcat 9.0.16-3~18.04.1 (Ubuntu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants