Changeset 56f3628 in mod_gnutls


Ignore:
Timestamp:
Jan 4, 2009, 10:52:40 AM (11 years ago)
Author:
Nokis Mavrogiannopoulos <nmav@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
f46e1f2
Parents:
1a53be1
git-author:
Nikos Mavrogiannopoulos <nmav@…> (01/04/09 10:52:40)
git-committer:
Nokis Mavrogiannopoulos <nmav@…> (01/04/09 10:52:40)
Message:

Added patch to fix issue with mod_proxy. Investigation and patch by Alain Knaff.

It seems that the reason for this behavior is that the mgs_hook_pre_connection is being called both for incoming and outgoing (mod_proxy) connections.

The attached patch (mod_proxy.patch) tries to find out in which case we are, and returns OK without doing anything if it is an outgoing connection.

The method of telling both cases apart (namely, checking whether remote address' hostname is set) may seem somewhat hackish, but it does work, even if
HostnameLookups? is set to On.

If ever there is a problem with this method, we might need to check local port instead (whether it is 443), but that would break if a non-standard https port was used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r1a53be1 r56f3628  
    686686        return DECLINED;
    687687    }
     688
     689    if(c->remote_addr->hostname)
     690      /* Connection initiated by Apache (mod_proxy) => ignore */
     691      return OK;
    688692
    689693    ctxt = create_gnutls_handle(c->pool, c);
Note: See TracChangeset for help on using the changeset viewer.