Forum Discussion
nitass
Aug 02, 2013Employee
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::method] eq "POST"}{
if {[HTTP::header "Content-Length"] ne "" && [HTTP::header "Content-Length"] <= 1048576}{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1048576
}
if { $content_length > 0} {
HTTP::collect $content_length
}
}
}
when HTTP_REQUEST_DATA {
set a [URI::query "?&[HTTP::payload]" parA]
set b [URI::query "?&[HTTP::payload]" parB]
set c [URI::query "?&[HTTP::payload]" parC]
set d [URI::query "?&[HTTP::payload]" parD]
log local0. "a: $a b: $b c: $c d: $d"
}
}
trace
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.20.17(50767) <-> 172.28.19.252(80)
1375483782.1026 (0.0012) C>S
---------------------------------------------------------------
POST / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.252
Accept: */*
Content-Length: 38
Content-Type: application/x-www-form-urlencoded
parA=one&parB=two&parC=three&parD=four---------------------------------------------------------------
/var/log/ltm
[root@ve10:Active] config cat /var/log/ltm
Aug 3 06:49:42 local/tmm info tmm[5139]: Rule myrule : a: one b: two c: three d: four
set hsl [HSL::open -proto UDP -pool HSL]
just a small comment. i think hsl::open should be done in CLIENT_ACCEPTED.
just my 2 cents.