Request Entity Too Large

后端 未结 5 1767
天涯浪人
天涯浪人 2020-12-06 00:38

I get this message,

Request Entity Too Large
The requested resource
/index.php
does not allow request data with POST requests, or the amount of data provide         


        
5条回答
  •  清歌不尽
    2020-12-06 01:28

    I was struggling with this 413 - Request entity too large problem for last day or so, as I was trying to upload farely large (in MBs) images to the server.

    My setup is apache (227) proxying requests to jboss eap (6.4.20) server for accessing rest endpoints.

    2 Things worked for me.

    1. Make SSLVerifyClient required at the virtual host level. This means all the resources need a valid client cert presented to be served. This was not an option for me as all the resources except /api should NOT be mutual auth protected. So, while it worked, this was not an option for me.

    2. I removed the global level SSLVerifyClient required and kept it 'optional'. I re enabled required option only on .... Trick was to have the SSL renegotiation happen only after a certain threshold is reached - which would be our desired upload file size.

    3. So, finally it turned out that I had to enable 'SSLRenegBufferSize' setting on a specific LocationMatch as follows:


      SSLRenegBufferSize 5242880 #allow upto 5MB for files to come through

    (.*) in the case above represents my path params in the endpoint. Hope this helps.

提交回复
热议问题