webharvest - How to output the browser User-Agent String using Web-Harvest library in Java -


testing issues application has been created using web-harvest library no avail. our network environment has mix of proxies , other filters , trying rule out problematic user-agent string.

i think issue how string being specified in application, don't know how output supplied string debugging.

i can see string within ide debugger, need have output others test on server.

you can output headers (and other information http processor) querying http object after executed. below example code saves header information webharvest variable

<config>     <http url="${yoururl}"></http>      <script><![cdata[             string keys="";             for(int i=0;i<http.headers.length;i++) {                 keys+=(http.headers[i].key + "=" + http.headers[i].value +"\n---\n");             }             setcontextvar("mycookie", keys);         ]]>      </script>   </config> 

the mycookie variable returns like:

server=apache --- content-language=en-gb --- pragma=no-cache --- cache-control=no-cache,no-store,must-revalidate --- expires=0 --- content-type=text/html;charset=utf-8 --- date=thu, 17 jul 2014 14:35:41 gmt --- transfer-encoding=chunked --- connection=keep-alive --- connection=transfer-encoding --- set-cookie=unique=%1%enc%3~~~ domain=~~~; path=/; expires=sat, 16 jul 2016 14:35:40 gmt; httponly --- set-cookie=session=%1%v2id~~~ --- set-cookie=serverpool=a; domain=~~~ --- set-cookie=005db%3bhac01a%3a10023%3b; --- set-cookie=returnto=%1%%2f~~~ --- 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -