Forum Discussion
Andre_Padua_397
Feb 11, 2008Historic F5 Account
Grabbing POST Parameters
Hi All,
My first post to the form is about, well, POST.
I'm trying to grab POST parameters from a specific URL. For some reason, this isn't really happening. This is the code I ini...
hoolio
Cirrostratus
Feb 11, 2008Hi,
Is the client sending URL encoded or multipart/form-data POST parameters?
After collecting, how are you logging the payload? I assume you're logging the payload in the HTTP_REQUEST_DATA event, using HTTP::payload?
Can you capture a tcpdump of a request and view the TCP stream in Wireshark to see the exact HTTP headers and content you're sending?
Here is an example of how to collect the HTTP payload:
when HTTP_REQUEST {
log local0. "path: [HTTP::path]"
if { [HTTP::method] equals "POST" and [string tolower [HTTP::path]] ends_with "forumlogin.aspx"} {
if {[HTTP::header value "Content-Length"] > 0} {
log local0. "Found Content-Length: [HTTP::header value Content-Length]"
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 10
}
HTTP::collect $content_length
}
}
when HTTP_REQUEST_DATA {
log local0. "payload length: [HTTP::payload length]"
log local0. "payload: [HTTP::payload]"
}Aaron
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
