1

We're seeing an issue that sounds identical to the one reported here:

Intermittent empty $_POST issue

I'm not sure if that question was ever resolved (but I don't have the ability to comment on that post).

It is an extjs form submitted thousands of times a day (json encoded data), with maybe 20 failures getting logged (to a text log we're keeping) each day. We're on Apache, PHP 5.3.14.

We've done extensive searches on users experiencing empty and truncated POST data and tried a number of things, including:

  • checking value of php://input (also empty/truncated)
  • checking/increasing config settings like post_max_size
  • explicitly setting content type
  • experimenting with keepalive settings
  • when data is truncated, it is seemingly random (not special characters)
  • the length of data POSTed doesn't seem to be a factor (truncates at random place, independent of how many fields are being POSTed back)

One potential clue is that when the POST comes back completely empty, it seems to always be with Internet Explorer or Safari. For the ones that are truncated, it doesn't appear to be specific to a particular browser (so it is possible that there are two separate problems at work here).

We're running out of ideas about what to try -- any ideas?

Community
  • 1
  • 1
  • Have you checked if the `Content-Length` header's value corresponds to the length of the posted content, and have you checked if these people are using proxies? See also: http://stackoverflow.com/questions/328281/why-content-length-0-in-post-requests – Gijs Nov 01 '12 at 20:20
  • @Neal It is an extjs form created via "new Ext.FormPanel" with "name" and "id" parameters set to "formPanelID", and the "url" parameter set to the php file that handles the submit. There are two save buttons (with different ids), with "click" listeners that call submitForm(form). Inside submitForm() we are doing some validation, then submitting the form (json encoded) using form.getForm().submit() with method: 'POST'. There is a lot of code involved here -- is there something in particular that would be helpful? – Anony Mouse Nov 01 '12 at 20:26
  • @Gijs Printing out the value of Content-Length was actually the next thing I was going to add to our logging of the issue -- I'll add that and let you know what it shows as soon as I have some data. – Anony Mouse Nov 01 '12 at 20:30
  • 1
    @Gijs So for about half the errors, we are seeing 0 Content-Length and 0 POST data -- these seem to happening exclusively in MSIE (although I think I've seen them ocassionally in Safari in previous logs). Then there are a few MSIE ones where Content-Length is non-0, but the posted data is empty. I'm guessing those two cases are somehow related. But then there seems to be a 3rd case, which doesn't look browser-specific, where the Content-Length is greater than the size of the POSTed data, and not all the fields POST as expected, and one is truncated randomly in the middle. – Anony Mouse Nov 05 '12 at 23:05
  • By the way, the ones where the POST data is 0 do seem to be concentrated at certain customer locations. I checked with one of them where it is happening more frequently and they are not on wireless computers, and they don't have any IE add-ons installed that I would be suspicious of interfering. What else would you suggest I ask them? – Anony Mouse Nov 05 '12 at 23:07
  • Are they using proxies? Alternatively, perhaps they're behind certain really insidious corporate firewalls? Ask them to try it at home if possible (not over a VPN or proxy that gets them back to being behind the same firewall). – Gijs Nov 08 '12 at 11:57
  • 1
    Another interesting detail -- we tried turning KeepAlive on (keeping connections open 1 second) and it resulted in a pretty dramatic increase in the rate that the MSIE empty POST errors were occurring (not specific to IE version -- saw instances of IE8 and IE9). – Anony Mouse Nov 21 '12 at 04:24
  • Most important question: what authentication method are you using? SSPI? – Amit Naidu Dec 17 '13 at 00:07
  • Hi @AnonyMouse - I am experiencing what seems like the exact same problem and it is driving me insane! Did you ever find any resolutions? – Andy W Oct 09 '14 at 19:12

1 Answers1

0

We found something in our app that could have been causing the problem. We had a menu that used javascript and it was doing a form submission, i.e. document.formname.submit(). People were clicking on the menu before the whole page was loaded. This submission had the potential to submit part of a form. This was a javascript HTML issue not server related.

GodLovesYou
  • 311
  • 1
  • 3
  • 10