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

DNS lookup for localhost fails on Linux #63

Open
da-terry opened this issue Jul 10, 2012 · 0 comments
Open

DNS lookup for localhost fails on Linux #63

da-terry opened this issue Jul 10, 2012 · 0 comments

Comments

@da-terry
Copy link
Contributor

When using "localhost" (after removing the proxy restriction), Lookup tries to do a DNS A lookup using the search domain from resolv.conf, which will fail in most cases for obvious reasons. It seems to ignore /etc/hosts as a first lookup step.

Trying to use 127.0.0.1 instead fails as well, since HTTPClient does a reverse lookup and sends "localhost" again to BrowserMobHostNameResolver.

The only workaround I've found is to use a remap rule, like so:

proxy.start()
proxy.remapHost("localhost", "127.0.0.1")

This bypasses the broken DNS lookup.

nirvdrum pushed a commit to mogotest/browsermob-proxy that referenced this issue Mar 26, 2014
Modified to log the request body during post
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