请求标头字段的大小超出服务器限制

I am getting the following error again and again .. and I am not able to figure out what is wrong! All I did was that i copied and pasted the code from developers.facebook.com, and changed the app id and fb secrey key which i have crossed out for these questions!

The error is:

Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. Referer /n

The code is as given below:

                <?php
            define('FACEBOOK_APP_ID', 'xxxxx');
            define('FACEBOOK_SECRET', '2ab5cxxxxxxxxxx89a');

            function parse_signed_request($signed_request, $secret) {
              list($encoded_sig, $payload) = explode('.', $signed_request, 2); 

              // decode the data
              $sig = base64_url_decode($encoded_sig);
              $data = json_decode(base64_url_decode($payload), true);

              if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
                error_log('Unknown algorithm. Expected HMAC-SHA256');
                return null;
              }

              // check sig
              $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
              if ($sig !== $expected_sig) {
                error_log('Bad Signed JSON signature!');
                return null;
              }

              return $data;
            }

            function base64_url_decode($input) {
                return base64_decode(strtr($input, '-_', '+/'));
            }

            if ($_REQUEST) {
              echo '<p>signed_request contents:</p>';
              $response = parse_signed_request($_REQUEST['signed_request'], 
                                               Facenook_Secret);
              echo '<pre>';
              print_r($response);
              echo '</pre>';
            } else {
              echo '$_REQUEST is empty';
            }
            ?>

I got the same error doing some SHA2 hashing in javascript, after some code changes, on a previously working site. This error was displayed by the default Android "Internet" browser on a Galaxy S3. The Firefox mobile browser exhibited different incorrect behavior. I did not identify the specific problem in code, but going to the settings for the "Internet" app, clearing the cache, and clearing all the application data, finally made this error go away. The Firefox mobile browser corrected itself after some refreshing.