Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

_setHttpHeader construct is not working

bgauravbgaurav Members
edited January 2014 in Sahi Pro
I am trying to use _setHttpHeader construct of sahi_pro.
For example, I am navigating to sears URL.

<script>
_setHttpHeader("user-agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2");
_navigateTo("http://www.sears.com/shc/s/p_10153_12605_SPM851751914P?sid=IDx20101019x00001a&ci_src=25356082&ci_sku=SPM851751914&sa=X&ei=EyW7UprZNtH7oASo4oCQBg&ved=0CBcQ-RIwAA";);
_wait("10000");
</script>

From traffic logs, sahi is sending some request without setting the new user agent and this is happening for those requests where cookie sahisid is missing.
E.g.
>> ls /sahi_pro1/userdata/logs/traffic/2014_01_12 |grep -i 'sear'
10_39_38_078_Sears.js
10_39_38_320_Sears.css
10_40_38_260_Sears.css
10_40_38_260_Sears.js
10_40_57_723_sears-mtagconfig.js

Here new user agent is not set for '10_39_38_078_Sears.js', but it got selected for '10_40_38_260_Sears.js'.
Also for '10_40_57_723_sears-mtagconfig.js' old user agent was passed to server.

I want to know
1) why it was not set for '10_40_57_723_sears-mtagconfig.js'? Actually I want to send some updatedheaders to my server, without which the server will fail the request.
2) Why it was sending multiple entries to server for some js?


Firefox : 17.0.9
OS : Linux, RedHat 2.6.18-164.el5
Version : Sahi Pro 5.1.0.0
Build : 2013-12-02 17:00:15
Sign In or Register to comment.