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

--no-externals fails when initial redirect changes the domain #197

Closed
stefanjudis opened this issue Jan 1, 2014 · 3 comments
Closed

--no-externals fails when initial redirect changes the domain #197

stefanjudis opened this issue Jan 1, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@stefanjudis
Copy link
Contributor

This following command is returning 254. It works for other urls ( for example http://gruntjs.com )

$ phantomas --url http://google.com --no-externals
FAIL: 254

I'm on MacOs with phantomas 0.11.1.

@macbre
Copy link
Owner

macbre commented Jan 1, 2014

@stefanjudis , you've found a really nice edgecase :)

$ ./bin/phantomas.js --url http://google.com --no-externals --verbose
...
20:39:51.978 Assuming google.com to be the main domain
...
20:39:52.101 Blocked request: <http://www.google.com/>
...
20:39:52.103 Page loading finished ("fail")
20:39:52.103 Event loadFailed emitted
20:39:52.104 Exiting with code #254!

google.com redirects to www.google.com, --no-externals applies a block (as www.google.com != google.com) causing the whole report to fail.

Fix: set main domain after all initial redirects are completed.

@ghost ghost assigned macbre Jan 1, 2014
@stefanjudis
Copy link
Contributor Author

Ha ha... Nice. 👍
Thanks.

@macbre macbre reopened this Jan 1, 2014
@macbre
Copy link
Owner

macbre commented Jan 1, 2014

Please allow me to fix this one 😄

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

2 participants