jQuery to PHP: no input... kinda
- by Seva Alekseyev
Hi all,
I'm using jQuery to post HTTP requests to my PHP page (Apache/Linux, if that matters). I carefully validate on the client so that empty requests are not sent. However on occasions, I'd get an empty request like this:
- $_POST collection empty ($_GET collection also empty);
- Content-Length is nonzero (a number below 100, consistent with a valid POST from my script)
- Content-Type properly application/x-www-form-urlencoded
- reading from php://input yields an empty string
It's as if $_POST is somehow eaten on the way. I checked the code very carefully - I don't do anything to the contents of $_POST.
Any ideas, please?