Forum Discussion

Wangzixuan_3147's avatar
Wangzixuan_3147
Icon for Nimbostratus rankNimbostratus
Nov 27, 2018

How to modify http post request

Hello everyone: We found on f5 that the content-length of the client-submitted request was 46, but the actual received is greater than 46, and the packet capture found an additional \r\n, but the data was received, and the first f5 was forwarded. The first 46 bytes to the server, the server can Respond correctly. However, when the client sends the second request, we find that f5 adds the \r\n that was not sent for the first time to the front of the POST and sends it to the server, causing the server to be unaffected. Print the log on f5 is such a " POST XXXX..", how to remove the space before POST

I wrote the irule as follows, but it doesn't seem to work.

when HTTP_REQUEST {
     if { [HTTP::method] equals "POST" } {
        string map {"\r\nPOST" "POST"} [HTTP::request]
}
}
No RepliesBe the first to reply