Forum Discussion
[HTTP::payload] in event HTTP_REQUEST_DATA only respresent data collected or the whole http payload?
1:HTTP::collect $content_length collects up to 1MB of data,how to call this data?
2:[HTTP::payload] in event HTTP_REQUEST_DATA only respresent 1MB data or the whole http payload?
when HTTP_REQUEST {
if {[HTTP::method] eq "POST"}{
Trigger collection for up to 1MB of data
if {[HTTP::header "Content-Length"] ne "" && [HTTP::header "Content-Length"] <= 1048576}{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1048576
}
Check if $content_length is not set to 0
if { $content_length > 0} {
HTTP::collect $content_length
}
}
}
when HTTP_REQUEST_DATA {
set payload [HTTP::payload]
8 Replies
- nitass_89166
Noctilucent
2:[HTTP::payload] in event HTTP_REQUEST_DATA only respresent 1MB data or the whole http payload?
it will return whole payload. if you want only 1mb, you have to include 1048576 e.g. HTTP::payload 1048576
- Robert_47833
Altostratus
even I collect up to 1M data? set content_length 1048576 HTTP::collect $content_length - nitass_89166
Noctilucent
yes - Robert_47833
Altostratus
HTTP::payload &182; Returns the content that the HTTP::collect command has collected thus far, up to the number of bytes specified. If you do not specify a size, the system returns the entire collected content. becasue I only collected 1M, does it mean it will only respent 1M data?
- nitass
Employee
2:[HTTP::payload] in event HTTP_REQUEST_DATA only respresent 1MB data or the whole http payload?
it will return whole payload. if you want only 1mb, you have to include 1048576 e.g. HTTP::payload 1048576
- Robert_47833
Altostratus
even I collect up to 1M data? set content_length 1048576 HTTP::collect $content_length - nitass
Employee
yes - Robert_47833
Altostratus
HTTP::payload &182; Returns the content that the HTTP::collect command has collected thus far, up to the number of bytes specified. If you do not specify a size, the system returns the entire collected content. becasue I only collected 1M, does it mean it will only respent 1M data?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
