Forum Discussion

Dan_36909's avatar
Apr 23, 2010

HTTP Response Capture Node Name

regsub -all "" [HTTP::payload] " [IP::server_addr] newdata

 

HTTP::payload replace 0 $content_length $newdata

 

HTTP::release

 

 

I'm trying to get an iRule configured to present the "Node:List Name" to the users

 

 

This is what I have which dispays IP but I need node name

 

 

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi Dan,

     

     

    The node name isn't accessible from an iRule. Can you explain more on what you're trying to accomplish and why so we can give you a suggestion?

     

     

    Thanks,

     

    Aaron
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Do you want to do this on all responses? Could you use the IP address instead? If so, you could add a blank stream profile, a custom HTTP profile with response chunking set to rechunk and an iRule like this to rewrite the title tag in responses to title>1.1.1.1:

    
    when HTTP_RESPONSE {
        Disable the stream filter by default
       STREAM::disable
        Check if response type is text
       if {[HTTP::header value Content-Type] contains "text"}{
           Insert the server IP address:port into the HTML title tag
          STREAM::expression "@[subst -nocommands {[tT][iI][tT][lL][eE]>}]@title>[IP::server_addr]:[TCP::server_port]@"
           Enable the stream filter for this response only
          STREAM::enable
       }
    }

    Aaron
  • Aaron, for some reason the forum software didn't like you using the full title html element and was blocking it even if the angle brackets were encoded. I modified your response to remove the beginning less-than symbol and it's posting. I'll look into this and see if I can get a fix.

     

     

    -Joe