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

cursorMark not uri encoded #165

Closed
flawless2011 opened this issue Dec 3, 2015 · 0 comments
Closed

cursorMark not uri encoded #165

flawless2011 opened this issue Dec 3, 2015 · 0 comments

Comments

@flawless2011
Copy link
Contributor

Currently the value passed into Query.prototype.cursorMark() does not get uri encoded prior to attaching to the parameters array. If characters like + or = are included in the nextCursorMark values from Solr (which they can be) the request will fail like this:

{"name":"SolrError","message":"{"responseHeader":{"status":400,"QTime":2,"params":{"sort":"indexTime desc,rk desc","q":"fieldName:","cursorMark":"AoJ tseqstECNzEyMzQ1Njc4OV8xNDQ5MDkyODU1NjM3","wt":"json","rows":"3"}},"error":{"msg":"Unable to parse 'cursorMark' after totem: value must either be '' or the 'nextCursorMark' returned by a previous search: AoJ tseqstECNzEyMzQ1Njc4OV8xNDQ5MDkyODU1NjM3","code":400}}\r\nRequest URL: http://solr.domain.org:8983/solr/testTable/select?q=fieldName:*&sort=indexTime%20desc,rk%20desc&rows=3&cursorMark=AoJ+tseqstECNzEyMzQ1Njc4OV8xNDQ5MDkyODU1NjM3&wt=json\r\nRequest method: GET\r\nStatus code: 400 - Bad Request\r\nRequest headers: \r\naccept: application/json; charset=utf-8\r\nhost: solr.domain.org:8983\r\nResponse headers: \r\nserver: Apache-Coyote/1.1\r\ncache-control: no-cache, no-store\r\npragma: no-cache\r\nexpires: Sat, 01 Jan 2000 01:00:00 GMT\r\nlast-modified: Thu, 03 Dec 2015 14:41:53 GMT\r\netag: "151684ad3e1"\r\ndate: Thu, 03 Dec 2015 14:41:53 GMT\r\ncontent-type: text/plain;charset=UTF-8\r\ntransfer-encoding: chunked\r\nconnection: close"}

To prevent consumers from needing to do their own uri encoding, the Query.prototype.cursorMark() function should probably take care of it.

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

1 participant