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

Handle non-url encoded characters gracefully #15

Open
aaccomazzi opened this issue Sep 22, 2015 · 4 comments
Open

Handle non-url encoded characters gracefully #15

aaccomazzi opened this issue Sep 22, 2015 · 4 comments
Assignees
Labels

Comments

@aaccomazzi
Copy link
Member

Currently this query to the search API produces a 500 error:

https://api.adsabs.harvard.edu/v1/search/query?q=full:"foo"

However, this one works fine:

https://api.adsabs.harvard.edu/v1/search/query?q=full:%22foo%22

The only difference here is that the double quotes have been hex-encoded.

@jonnybazookatone
Copy link
Contributor

Most likely related to the monkeypatch, such that this is not accepted by the oauth module as an acceptable character.

@aaccomazzi
Copy link
Member Author

Is anybody other than me annoyed by this? I can't quite understand why the oauth module is so strict, and makes me wonder if there should be a normalization of the input query string ahead of its handling the request.

@romanchyla
Copy link
Contributor

But quotes have to be escaped, unless I'm wrong, of course. When I use curl
it fails too. I will check though
On Oct 14, 2015 9:37 AM, "Alberto Accomazzi" notifications@github.com
wrote:

Is anybody other than me annoyed by this? I can't quite understand why the
oauth module is so strict, and makes me wonder if there should be a
normalization of the input query string ahead of its handling the request.


Reply to this email directly or view it on GitHub
#15 (comment)
.

@aaccomazzi
Copy link
Member Author

I don't see the double quote character listed in the reserved set on this page: https://en.wikipedia.org/wiki/Percent-encoding

But either way, my general impression is that the oauth module we are using is overly restrictive, and don't quite understand why. The fact that we have to monkey-patch it is disturbing to me and makes me wonder whether I'm missing something.

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

No branches or pull requests

3 participants