Forum Discussion

leozou_80567's avatar
leozou_80567
Historic F5 Account
Nov 02, 2008

tcp::collect question

Dear,

 

I have one iRule:

 

 

when CLIENT_ACCEPTED {

 

TCP::collect

 

}

 

when CLIENT_DATA {

 

set tcp_payload [string tolower TCP::payload]

 

 

if { not ($tcp_payload matches_regex {(get|post|head|put|delete|options|trace)})} {

 

if {$::http_log}{log local0. " SELECT forward default_pool"}

 

forward

 

} elseif { $tcp_payload matches_regex {(get|post|head|put|delete|options|trace) [\x09-\x0d -~]* http/[01]\.[019]}} {

 

if {$::http_log}{log local0. " SELECT HTTP_Proxy_Pool"}

 

pool HTTP_Proxy_Pool

 

} elseif { [TCP::payload length] <=4096 } {

 

TCP::collect

 

return

 

}

 

TCP::release

 

}

 

 

we find : if we telnet from a client to a server, the screen don't appear login username prompt right now. we should enter a keyboard then the login username will prompt. we know that this is due to tcp::collect and tcp::release. For telnet application the server should response message to client before client enter more message. In our iRule, if there is not client enter, tcp::release will not be triggered. We real don't know how to modify our iRule.

 

Would anyone help me to deal with this case?

 

Thanks!

1 Reply

  • Hi there,

     

     

    Take a look at Spark's recent post on handling clients where the protocol requires the server send data first:

     

     

    Check protocol in iRule (Click here)

     

     

    Aaron