WebPagetest Forums
custom headers and Host Resolver rules not working on Android Agents - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: custom headers and Host Resolver rules not working on Android Agents (/showthread.php?tid=14459)



custom headers and Host Resolver rules not working on Android Agents - jpakhil@gmail.com - 08-17-2016 03:09 AM

Hi,

Is custom headers and host resolver rules not expected to work for Android Chrome Agents? I tried it on the public instance of WPT and it looks like none of the devices support these two options, so just wanted to make sure if this is expected or a bug.

Thanks
Akhil


RE: custom headers and Host Resolver rules not working on Android Agents - pmeenan - 08-17-2016 04:36 AM

It is expected. Mobile agents can't intercept the requests and do any modification.

That said, the "setDns" command should work on the mobile agents as it modifies the hosts file to do the remapping.


RE: custom headers and Host Resolver rules not working on Android Agents - jpakhil@gmail.com - 08-17-2016 06:32 AM

Thanks Pat, is there a UI where I can enter the IP so that it gets transcribed as a setDNS command to the Android Agent ?

(08-17-2016 04:36 AM)pmeenan Wrote:  It is expected. Mobile agents can't intercept the requests and do any modification.

That said, the "setDns" command should work on the mobile agents as it modifies the hosts file to do the remapping.



RE: custom headers and Host Resolver rules not working on Android Agents - pmeenan - 08-17-2016 07:39 AM

setDns is done through a script in the script tab of advanced settings (which has a link to the docs).

Something like:

Code:
setDns www.example.com 1.2.3.4
navigate www.example.com



RE: custom headers and Host Resolver rules not working on Android Agents - jpakhil@gmail.com - 08-17-2016 07:52 AM

Thanks Pat, I just found this link and figured it out https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting#TOC-setDns and I had to use navigate https://mp2demo.test.edgekey.net to make sure it was a https transaction

setDns mp2demo.test.edgekey.net 23.79.0.45
addHeader Pragma: akamai-x-cache-on
navigate https://mp2demo.test.edgekey.net

addHeader still doesn't work, which was expected - it will be nice to point out which script tags work on Android Chrome vs Desktop Chrome.

BTW this tool is awesome !

(08-17-2016 07:39 AM)pmeenan Wrote:  setDns is done through a script in the script tab of advanced settings (which has a link to the docs).

Something like:

Code:
setDns www.example.com 1.2.3.4
navigate www.example.com