Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

localhost:8080/ no longer resolves #2015

Closed
nipunn1313 opened this issue Aug 28, 2016 · 3 comments
Closed

localhost:8080/ no longer resolves #2015

nipunn1313 opened this issue Aug 28, 2016 · 3 comments
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior.

Comments

@nipunn1313
Copy link
Contributor

I believe the issue was caused by #1964
I verified by checkout out before/after 124a5da75eae85aa8f6470a5cbf9e39fe0001477
You need to clear cookies/cache in your browser to repro (I was using chrome)

localhost:8080 does not resolve
localhost:8080/ does not resolve
localhost:8080/home does not resolves
localhost:8080/home/ resolves
home.parity/ resolves (when set up correctly)

Trying to dig into the root of the issue. @tomusdrw

@nipunn1313
Copy link
Contributor Author

I printed out some information for each of the cases pointing to the issue, but I haven't figured out exactly where the regression happened in the code.

2016-08-28 13:31:45
ENDPOINT: (None, None)
URL: Some(Url { raw: "http://localhost:8080/home", host: Domain("localhost"), port: 8080, path: ["home"], username: None, password: None })
REQ:  Request { method: Get, uri: AbsolutePath("/home"), version: Http11, headers: Headers { Host: localhost:8080, Connection: keep-alive, Cache-Control: max-age=0, Upgrade-Insecure-Requests: 1, User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8, Accept-Encoding: gzip, deflate, sdch, Accept-Language: en-US,en;q=0.8, } }
2016-08-28 13:30:14
ENDPOINT: (None, None)
URL: Some(Url { raw: "http://localhost:8080/", host: Domain("localhost"), port: 8080, path: [""], username: None, password: None })
REQ:  Request { method: Get, uri: AbsolutePath("/"), version: Http11, headers: Headers { Host: localhost:8080, Connection: keep-alive, Cache-Control: max-age=0, Upgrade-Insecure-Requests: 1, User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36, Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8, Accept-Encoding: gzip, deflate, sdch, Accept-Language: en-US,en;q=0.8, } }

Both of these are causing a fallthrough to "RPC by default" rather than redirecting to /home/ in https://github.com/ethcore/parity/blob/master/dapps/src/router/mod.rs#L96

Unclear what's supposed to happen. I think the path has length 1 which skips this arm
https://github.com/ethcore/parity/blob/master/dapps/src/router/mod.rs#L173

However, that arm did not change its condition in the commit which caused the regression, so there's something upstream from there changing the way the url is parsed.

@tomusdrw tomusdrw self-assigned this Aug 29, 2016
@tomusdrw tomusdrw added the F2-bug 🐞 The client fails to follow expected behavior. label Aug 29, 2016
@tomusdrw
Copy link
Collaborator

Good catch. Thanks for detailed description, I'll look into it.

@tomusdrw
Copy link
Collaborator

Actually there was a change in the match - it was expecting a path and before it was redirecting any GET requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior.
Projects
None yet
Development

No branches or pull requests

2 participants