Forum Discussion
nitass
Aug 12, 2012Employee
what about this one?
[root@ve10:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::host] eq "mycompany.com" } {
HTTP::collect [HTTP::header "Content-Length"]
}
}
when HTTP_REQUEST_DATA {
log local0. "[HTTP::payload]"
if { [HTTP::header Expect] eq "100-continue" } {
HTTP::respond 100 noserver
} else {
HTTP::respond 200 noserver
}
}
}
on client
[root@centos251 ~] curl -d "this_is_post_100_data" -i http://172.28.19.79 -H "Host: mycompany.com" -H "Expect: 100-continue"
HTTP/1.0 100 Continue
Connection: Keep-Alive
Content-Length: 0
[root@centos251 ~] curl -d "this_is_post_data" -i http://172.28.19.79 -H "Host: mycompany.com"
HTTP/1.0 200 OK
Connection: Keep-Alive
Content-Length: 0
on bigip
[root@ve10:Active] config cat /var/log/ltm
Aug 12 18:23:54 local/tmm info tmm[14353]: Rule myrule : this_is_post_100_data
Aug 12 18:24:12 local/tmm info tmm[14353]: Rule myrule : this_is_post_data