skip to Main Content

The Apache server I work with returns a 500 error due to too large a header.

Specifically, the header is this:

X-Drupal-Cache-Tags: block_view config: admin_toolbar_search.settings ... ... rendered user: 123456 views_data

It is a header that occupies more than 9K.

Is there a way to tell Apache to accept response headers of any size?

Thanks.

2

Answers


  1. Chosen as BEST ANSWER

    Looking in the Apache logs I have found this:

    Premature end of script headers: index.php
    AH01070: Error parsing script headers
    AH01075: Error dispatching request to:
    

    Here is the bug reported in Apache's bug tracking system: https://bz.apache.org/bugzilla/show_bug.cgi?id=64919

    I do not know if it is corrected.


  2. You can use Apache Module mod_headers to customize your header.
    Try this in htaccess and have fun 😉

    Doc :
    https://httpd.apache.org/docs/2.4/mod/mod_headers.html

    OR

    Using PHP you can check if header_remove is available.

    <?PHP
        header_remove("X-Powered-By"); 
    ?>
    

    I found this useful link for you too
    "How To Remove Unwanted HTTP Response Headers"

    Hope this tips help you !

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search