Can not upgrade modules, get 500 Internal Server Error from

I have a new Asterisk / FreePBX server using

  • CentOS 7
  • Asterisk 13.6.0
  • FreePBX

I am unable to upgrade modules from Module Admin or from the command line. After much investigation, I see that I get “500 Internal Server Error” as a reply to the download POST request in modulefunctions.class.php:1366. I see that there is a long and complicated POST string (quoted below). If I remove that string from the request the download succeeds.

Please can you help me understand why the POST string causes your server to fail?