borrow central static variable storage and http response header handling from Drupal