Forum Discussion

Simon_Knox_1115's avatar
Simon_Knox_1115
Icon for Nimbostratus rankNimbostratus
Feb 27, 2006

Perl/insert headerpossible bug?

Hi,

 

 

This might be a support issue but its not to urgent so I thought I'd ask if anyone here could explain this problem.

 

 

I have some old website that use per scripts to output html pages. This is on IIS6 with Active Perl installed. Traffic to these is load balanced by a big-IP (9.1.0) using a simple iRule and a round robined pool.

 

 

The other day I added this to the bottom of the rule

 

 

when HTTP_RESPONSE {

 

HTTP::header insert CLIENT [IP::client_addr]

 

}

 

 

This was just to return a header containing the clients IP address as a return header for debug purposes.

 

 

A soon as I did this the perl files (.pl or .bin) stopped executing, the browser gave the option to download them instead of rendeing hte page (like IIS didn't have the right mime mapping).

 

 

When I donwloaded the file it appeared to be the valid html page that the scripts are supposed to produce. I can only assume that the headers that tell IE what to do with the page were missing (same thing happened with firefox).

 

 

As soon as I removed the HTTP_RESPOSE setion from the rule all was fine again.

 

 

Any thoughts?

 

 

Cheers

 

Simon
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    This code would effectively insert a header named "CLIENT" into the response that has the value of the client address. Is this your intent?

     

     

    I'd recommend trying a different header name. Something a little more distinctive like X-Cust-Client or something to that effect.

     

     

    Adding a header to the response shouldn't cause your browser to download your perl scripts. That would indicate to me that the server could no longer determine the appropriate filetype, and wasn't sure what to do with it, like you said. This shouldn't occurr by just adding a header like you've outlined, though.

     

     

    Were there any other changes that took place?

     

     

    -Colin
  • Hi,

     

     

    Yep that was my intent. Its definatly this script that causes the problem as the site works fine locally and from other servers behind the Big-IP.

     

     

    I'll try using a different header name incase the one I was using is already being used for something.

     

     

    Cheers

     

    Simon