Forum Discussion
João_Assad_4295
Nimbostratus
Nov 14, 2005redirect POSTs bigger than 1MB
Hello,
I'd like to redirect POSTs bigger than 1MB to an error page, so I tried this:
when HTTP_REQUEST {
set method [HTTP::method]
set clen [HTTP::header Content-Length]
if { $metho...
Jari_Hyttinen_1
Nimbostratus
Mar 21, 2006This rule works with IE6 but not with Mozilla based browsers. Why is that ?
The client shows a alert "The document contains no data"
The rule is:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/upload" } {
set method [HTTP::method]
set clen [HTTP::header Content-Length]
if { $method =="POST" and $clen > 40960 } {
log local0. "Over 40 kb post: ($clen) from [IP::client_addr]"
reject
HTTP::respond 307 "Location" "http://www.mydomain.com/xxx.html"
}
}
}
I have tried to add HTTP::close before HTTP::respond, but it doesn't effect anyway.
I also tried to change HTTP::respond line to
HTTP::respond 303 content "http://www.mydomain.com/xxx.html"
and it doesn't effect either.
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