Forum Discussion

ukitsysadmin_95's avatar
ukitsysadmin_95
Icon for Nimbostratus rankNimbostratus
Sep 10, 2014

Operation not supported (line 7) invoked from within "HTTP::header replace Location

Hello all,

 

i'm getting this error in the logs, and for the life of me can't work out why:

 

error:

 

TCL error: Instance1_8080 - Operation not supported (line 7) invoked from within "HTTP::header replace Location [string map ":[TCP::remote_port] 8080" [HTTP::header value Location]]"

 

Here is the part of the irule in question:

 

when HTTP_RESPONSE priority 100 {

 

if { [HTTP::is_redirect] } {

 

HTTP::header replace Location [string map -nocase {8080 80 8081 80} [HTTP::header value Location]]

 

LB version: BIG-IP 10.2.4 Build 655.0 Hotfix HF4

 

Regards

 

James

 

2 Replies

  • Hi James,

     

    The syntax of the iRule passes muster. I am assuming that you are trying to replace Server Ports with the Client Port.

     

    If so, try this: HTTP::header replace Location [string map ":[TCP::server_port]/ :[TCP::local_port clientside]/" [HTTP::header value Location]]

     

    If it does not, can you provide the entire iRule?

     

  • Perhaps removing some of the complexity from that line would help;

    when HTTP_RESPONSE priority 100 {
     if { [HTTP::is_redirect] } {
     set $locationvalue [string map -nocase {8080 80 8081 80} [HTTP::header value Location]]
     HTTP::header replace Location $locationvalue