public static function generateMetadataHeaders(array $metadata, $prefix = NULL) {
    if (empty($prefix)) {
      $prefix = Container::METADATA_HEADER_PREFIX;
    }
    $headers = array();
    foreach ($metadata as $key => $val) {
      $headers[$prefix . $key] = $val;
    }
    return $headers;
  }