title: “Expected token not present” error in my Apache log
body: <p>My website runs on Apache 2 with mod_perl and uses the Mason template system. I am not using any authentication system or any sessions in my website, but sometimes (at random) I get this error:</p>
  
  <blockquote>
    <h1>Internal Server Error</h1>
    
    <p>The server encountered an internal error or misconfiguration and was
    unable to complete your request.</p>
    
    <p>Please contact the server administrator, webmaster@admin.org
    and inform them of the time the error occurred, and anything you might
    have done that may have caused the error.</p>
    
    <p>More information about this error may be available in the server error
    log.</p>
    
    <p>Additionally, a 500 Internal Server Error error was encountered while
    trying to use an ErrorDocument to handle the request.</p>
  </blockquote>
  
  <p>In the error log, the corresponding record is:</p>
  
  <pre><code>[Mon Dec 19 09:34:26 2011] [error] [client 127.0.0.1] Expected token not present
  </code></pre>
  
  <p>Server version string:</p>
  
  <pre><code>Apache/2.2.8 (Ubuntu) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8 Server
  </code></pre>
  
  <p>My browsers sends this weird cookie:</p>
  
  <pre><code>Name:                   BC_BANDWIDTH
  Content:                1324486772745,6811
  Domain:                 example.org
  Path:                   /
  Send For:               Any kind of connection
  Accessible to Script:   Yes
  Created:                Wednesday, December 21, 2011 12:59:09 PM
  Expires:                When I close my browser
  </code></pre>
  
  <p>When I delete it, I can reload my page and it works. However after a couple of clicks the problem reappears.</p>
  
  <p><strong>Why am I getting the error in my error log? How to fix it?</strong></p>