What can cause empty data body in http form post submission?

When doing a POST request, PHP fills variable $_SERVER'CONTENT_LENGTH' with the size of posted data. It is not present for GET requests.

When doing a POST request, PHP fills variable $_SERVER'CONTENT_LENGTH' with the size of posted data. It is not present for GET requests. If posted data is too large (larger than a value of post_max_size directive in PHP) or has invalid structure, $_POST array is empty (because PHP cannot decode posted data), but $_SERVER'CONTENT_LENGTH' is still being filled.

I believe JSP should have similar stuff. If you don't send contents of $_SERVER (or JSP equivalent), I'd advise to start doing it. If you do, then check it's CONTENT_LENGTH value (or JSP equivalent).

Additionally, in PHP, you might enable always_populate_raw_post_data directive and include $HTTP_RAW_POST_DATA in your e-mail message. It does not work with forms that have enctype='multipart/form-data' (forms that are used for uploading files), but an answer to another SO question describes a workaround for this.

The data content is not large for these posts (e.g. Registration and profile forms). The form is not a multipart. Error tracking aside, what could possibly cause this behavior?

I know from user's feedback that they have clicked on the submit button when they get the error page for no special reason. Even if you submit a blank you will get empty string attached to the name of input not a completely blank post body. – Pierre May 27 at 14:12 If possible, try enabling always_populate_raw_post_data and include $HTTP_RAW_POST_DATA in your error tracking email.

Alternatively, you can use file_get_contents('php://input') instead of $HTTP_RAW_POST_DATA, it should work without enabling always_populate_raw_post_data. Value of $_SERVER'CONTENT_LENGTH' should also be examined. – binaryLV May 27 at 14:17.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions