WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
SERVER_NAME vs. HTTP_HOST (4 posts)

  1. admintiger
    Member
    Posted 1 year ago #

    I noticed revisions in Changeset 556622 to "Use HTTP_HOST instead of SERVER_NAME because nginx has problems with it." SERVER_NAME is inherently more reliable where it is set, because its value is set by the server, whereas HTTP_HOST is taken from the HTTP request header and is whatever a client used for a request. Because of that, wouldn't it be better to use SERVER_NAME where it is set and to use the less-reliable HTTP_HOST only where necessary to support nginx or other servers that don't set it.

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Konstantin Kovshenin
    Member
    Posted 1 year ago #

    @admintiger the current trunk version seems to fix this.

  3. Tim Hyde
    Member
    Posted 1 year ago #

    In what way does the current trunk 'fix' this.

    Supercache 1.1 is totally broken on nginx because SERVER_NAME does not exist.

    As admintiger suggests, the plugin should default back to HTTP_HOST when SERVER_NAME doesn't exist. But the current version doesn't do this.

    This needs addressing urgently.

  4. Konstantin Kovshenin
    Member
    Posted 1 year ago #

    @livingos as I mentioned earlier, the current trunk version reverts that change back to using the HTTP_HOST header: http://plugins.svn.wordpress.org/wp-super-cache/trunk/wp-cache-base.php

    Don't confuse "trunk" with "1.1" or "latest stable".

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.