lightbody / browsermob-proxy

A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
http://bmp.lightbody.net
Apache License 2.0
2.17k stars 654 forks source link

localhost requests are not in log #253

Closed av-tatarnikov closed 9 years ago

av-tatarnikov commented 9 years ago

can't get localhost requests from har.getLog().getEntries()

tried such way // use only dnsjava proxyServer.setHostNameResolver(ClientUtil.createDnsJavaResolver()); // or use only native resolution proxyServer.setHostNameResolver(ClientUtil.createNativeCacheManipulatingResolver());

used both ProxyServer() and BrowserMobProxyServer()

windows 7, 64 bit, jdk 7 last update - any ideas?

jekh commented 9 years ago

Check to see if your browser and/or system proxy is set to bypass the proxy for local addresses. I believe by default Firefox bypasses the proxy for localhost and 127.0.0.1.

av-tatarnikov commented 9 years ago

Check to see if your browser and/or system proxy is set to bypass the proxy for local addresses

it is not true

I believe by default Firefox bypasses the proxy for localhost and 127.0.0.1.

For test automation I use IE 10, and no "bypass local host" option is set

jekh commented 9 years ago

Check the Windows proxy settings, too. There is a Windows option to bypass the proxy for localhosts.

Otherwise, do non-localhost addresses work for you?

av-tatarnikov commented 9 years ago

Correct me if I am wrong - I know only place where such settings take place - Control Panel -> Internet Options -> Connections ... etc.

non-localhost addresses are at HAR log, I can get request URL, response body. all I need. i.e. it is working.

localhost\127.0.0.1 addresses are critical, as they are usual addresses to connect to an application under test )

moreover - little proxy (I believe - "http debugging" messages are produced by little proxy) logs requests to localhost or 127.0.0.1

jekh commented 9 years ago

BMP fully supports localhost requests. Can you paste the BMP logs from a non-localhost request and a subsequent localhost request?

On Windows, as I recall, there is a little checkbox to bypass the proxy for local addresses in the "LAN Settings" dialog box. If you google for it, you should find some useful information.

jekh commented 9 years ago

I'm closing this issue since there's been no activity.