ST_Wong
Jul 20, 2015Cirrus
Please help: "Pool" in iRule breaks AJAX scripts?
Hi,
We use following simple irules for pool selection:
------------ cut here ---------
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/psreports/" } {
log local0. "Debug: using thrsit_psreports"
pool hrsit_b_pool
}
}
------------ cut here ---------
It works for some years until recently the software upgraded and AJAX scripts are used. It returns error when following sequence occurs
- user access through default pool.
- user click on links with pattern "/psreports/". Request served by pool hrsit_b_pool without problem.
- user click on links without pattern "/psreports/". Suppose default pool is used. Then got error like following:
Function 'xxx' Error: Unable to get property 'indexOf' of undefined or null reference. The error occurs somewhere near the code below:
try
{
var loader=this; this.req.onreadystatechange=function()
{
loader.onReadyState.call(loader); }
Then after 1 to 2 minutes, the link in step 3 above can be clicked without problem. I'm newbie to AJAX or Javascript, but just wonder if serving same browser session with different pools will break methods for "this" object, or did I go to the wrong direction?
Would anyone please help?
Thanks a lot. /ST Wong