tsoi_94459
Jan 25, 2015Nimbostratus
Missing POST Parameters
I have a virtual server with an iRule that redirects traffic by hostname. E.g.
when CLIENT_ACCEPTED {
switch [string tolower [HTTP::host]] {
somesite.myawesomedomain.com { virtual vs_child_somesite }
someothersite.myawesomedomain.com { virtual vs_child_someothersite }
}
}
This normally works great, but when a POST is sent to any of these servers, I don't see the POST data and the Content-Length is 0.
Running tcpdump on the web server to capture the POST requests reveals the issue:
sudo tcpdump -s 0 -A 'tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)'
POST /signin HTTP/1.1
host: somesite.myawesomedomain.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Cookie: _session=s1092tyahglskghado1i2
Origin: https://somesite.myawesomedomain.com
Referer: https://somesite.myawesomedomain.com/signin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36
X-Forwarded-For: 1.2.3.4
X-Forwarded-Port: 80
X-Forwarded-Proto: http
Content-Length: 0
Connection: keep-alive
Everything works fine if I go around the F5, straight to the server itself:
POST /signin HTTP/1.1
host: somesite-direct.myawesomedomain.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Cookie: _session=s1092tyahglskghado1i2
Origin: https://somesite.myawesomedomain.com
Referer: https://somesite.myawesomedomain.com/signin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36
X-Forwarded-For: 1.2.3.4
X-Forwarded-Port: 80
X-Forwarded-Proto: http
Content-Length: 178
Connection: keep-alive
utf8=%E2%9C%93&authenticity_token=kflcZfoGoig%2ByR6U0x3Rw%2BO6qbjpRlUVGIBK0gZmWWQ%3D&user%5Bemail%5D=steve&user%5Bpassword%5D=mycoolpass&user%5Bremember_me%5D=0&commit=Go