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

Davis Router is not working FirefoxOS #102

Open
nsisodiya opened this issue Feb 22, 2015 · 1 comment
Open

Davis Router is not working FirefoxOS #102

nsisodiya opened this issue Feb 22, 2015 · 1 comment

Comments

@nsisodiya
Copy link

In Firefox OS, We can use JS/HTML/CSS for app development.

Only difference is, it work with app:// protocol instead of http:// protocol

So, when I click on a <a href="/register"></a> then things are not working,

In normal browser setup,

Line number 1759 in Davis Router

   var route = self.lookupRoute(request.method, request.path);

here, request.path is equal to /register

But when I run the same code in FirefoxOS then

request.path is equal to app://3d97ccba-ab8c-4a3f-937f-fc894260b23c/register

So, Its a bug. I am digging more into it.

@nsisodiya
Copy link
Author

I got the exact place of Error
Somewhere in code, You are doing this..
line number 1459

raw.fullPath = raw.fullPath.replace(/^https?:\/\/.+?\//, '/');

So, I suggest for having a protocol based solution, Like
instead of using hardcode string like http:, we can use variable like window.location.protocol

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