Forum Discussion

4 Replies

  • I tried this:

     

    when HTTP_REQUEST { HTTP::collect [HTTP::header Content-Length] } when HTTP_REQUEST_DATA { set my_uri [HTTP::uri] set my_sessionId [findstr[HTTP::payload] "sessionId=" 1 ","] log local0. "found request sessionID: $my_sessionId in SOAP call: $my_uri" if { $my_sessionId != "" } { persist uie $my_sessionId } } when HTTP_RESPONSE { set my_sessionId [findstr[HTTP::payload] "sessionId=" 1 ","] log local0. "found response sessionID: $my_sessionId in SOAP response from: [LB::server addr]" if { $my_sessionId != "" } { persist add uie $my_sessionId } }

     

  • This seems to work fine:

     

    when HTTP_REQUEST { HTTP::collect [HTTP::header Content-Length] } when HTTP_REQUEST_DATA { set my_uri [HTTP::uri] set my_sessionId [findstr [HTTP::payload] essionId> 9 9

     

  • Two things:

    1. Do you see it logging the sessionID values in the request?

    2. Do you have this iRule applied to a universal persistence profile (not the VIP)?

    Also, minor typo in findstr command:

    when HTTP_REQUEST { 
        HTTP::collect [HTTP::header Content-Length] 
    } 
    when HTTP_REQUEST_DATA { 
        set my_uri [HTTP::uri] 
        set my_sessionId [findstr [HTTP::payload] "sessionId=" 10 ","] 
        log local0. "found request sessionID: $my_sessionId in SOAP call: $my_uri" 
        if { $my_sessionId != "" } { 
            persist uie $my_sessionId 
        } 
    } 
    when HTTP_RESPONSE { 
        set my_sessionId [findstr[HTTP::payload] "sessionId=" 10 ","] 
        log local0. "found response sessionID: $my_sessionId in SOAP response from: [LB::server addr]" 
        if { $my_sessionId != "" } { 
            persist add uie $my_sessionId 
        } 
    }