Forum Discussion
Brian_69413
Nimbostratus
Aug 09, 2012Collect Payload after 100-Continue
I am trying to have the load balancer respond as the server. The POST's that are coming in do not require any data returned, but are using the Expect: 100-Continue header. The below works and I see...
nitass
Employee
Aug 12, 2012what 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
