browsermob-proxy icon indicating copy to clipboard operation
browsermob-proxy copied to clipboard

addHeader method not working

Open tarunjain07 opened this issue 7 years ago • 3 comments

I'm using browsermob-proxy version 2.1.4 where addHeader and addHeaders are not working.

browsermob-proxy + selenium --> Chrome

code snippet -

browserMobProxy = new BrowserMobProxyServer();
browserMobProxy.start(0);
browserMobProxy.addHeader("Host", "www.adobe.com");

I have searched on google and tried many approaches. Can you please resolve this issue or suggest solution for this. Thanks in advance!

tarunjain07 avatar Aug 29 '17 12:08 tarunjain07

I am using version 2.1.5 and I was able to add header this way browserMobProxy.addHeader("Host", "www.adobe.com");

Probably you should upgrade to 2.1.5 if feasible

mediga avatar Nov 21 '17 12:11 mediga

even i upgrade with 2.1.5 it is not woking . proxy is started but header is not set with proxy . same code working in mac machine but not working in window with chrome

Harsh2711 avatar Feb 10 '19 09:02 Harsh2711

I have the same behavior, but only when my application under test and proxy both runs on localhost (but, of course, with different ports). If the application under test is not localhost, everything works fine. I am using: net.lightbody.bmp.browsermob-core 2.1.5 org.seleniumhq.selenium.selenium-java 3.141.59 geckodriver 0.26.0

If more informations are needed, let me know.

What I have asked me: Is it even possible to run a proxy and the application under test on the same host or is this conflicting with the behavior of a proxy?

kroegr avatar Apr 15 '20 11:04 kroegr