Forum Discussion
Anthony_Epron
Nimbostratus
Jun 16, 2020Irule to make HTTP request size compliant with header
Hello, I need to implement in F5 is a possibility to reject an HTTP request in case the size of the request is not corresponding to the Content-Length of the header. I cannot use ASM for ...
PeteWhite
Employee
Jun 21, 2020what you are trying to do will work with GET but you may wish to consider POST, where you will have to use HTTP::collect and use HTTP::payload length.
For use with GET, you can simply use string length:
when HTTP_REQUEST {
if { [expr { [string length [HTTP::request]] eq ne expr [HTTP::header "Content-Length"]} {
reject
}
}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
