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

Request query is ignored #12

Open
DressTheMonkey opened this issue Feb 15, 2014 · 0 comments
Open

Request query is ignored #12

DressTheMonkey opened this issue Feb 15, 2014 · 0 comments

Comments

@DressTheMonkey
Copy link

I noticed that when I attached a query to my URL, it wasn't showing up in the parameters. I tracked this down to a change in commit 4fa48b7. Instead of routing on the request.URL it routes on the request.URL.path in order to avoid the problem of JLRoutes using the host in the path.

This looks like some kind of rock and hard place. If the URL is used, the query is left alone, which is good, but the host is used, which is bad. If the URL.path is used the host is stripped off, which is good, but the query is also stripped off, which is bad.

Is JLRoutes using the host 'A Good Thing'? I notice the comment in that code says it is for some kind of backward-compatibility; maybe JLRoutes should not do it at all, or have a switch to disable it or something (which I realise is a topic to take up in the JLRoutes issues).

I'm putting this here because I don't think it is working right, but I don't know what is the right solution.

For the time being, to make it work in my app (I'm using Barista as a dev helper to dish up JSON to the iPhone app I'm developing), I have simply gone back to using URL for routing, and commented out the part of JLRoutes which uses the host name for routing.

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