$_SERVER[‘CONTENT_LENGTH’]

Archived from the Xataface Users forum.

kevinwen — Fri Mar 05, 2010 3:27 pm

I know when a post request is submitted, $_SERVER[‘CONTENT_LENGTH’] is available as well. If I want to check if the content length of the post request exceeds the post_max_size using this variable in my application ( or inside the delegate class), where and how should I get this done? Thanks.


shannah — Tue Mar 09, 2010 8:43 am

You could check it in your index.php file or in the beforeHandleRequest() method.

Code: Select all
if ( $_POST and $_SERVER['CONTENT_LENGTH'] > xxxxxx ) ....