Drupal 6 load balancing with SSL/HTTPS

When load balancing with SSL/HTTPS certificate on the load balancer and having the load balancer send out a normal HTTP request to the computer cluster Drupal 6 does not always notice the HTTPS request since the $_SERVER['HTTPS'] is not set. So for instance a JQuery (AJAX / AHAH) call in autocomplete will still use HTTP and get blocked by the load balancer causing an error.