In the hook_init(), this module calls securepages_redirect(), which calls securepages_match(). securepages_match() is then called in a form_alter, so there can be a case where securepages_match() is called multiple times for the same path. How about we add a static variable to reduce the overhead? Patch will be attached.

  // Prevent function from being called multiple times unnecessarily.
  static $securepages_match = array();
  if (in_array($path, $securepages_match)) {
    return;
  }
  array_push($securepages_match, $path);

Comments

djbobbydrake’s picture

Status: Active » Needs review
StatusFileSize
new700 bytes

Patch attached.

bisonbleu’s picture

I posted an issue a while back about too many redirects (https://drupal.org/node/1655264). After applying your patch, my issue is somewhat resolved. Logging out from a secure page (https) no longer generates an error from my browsers. I'll do a little more testing and report back.

Bravo!

astonvictor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks