protected function setLocationHeaderFromOid($oidStr) {
    $oid = ObjectId::parse($oidStr);
    if ($oid) {
      $response = $this->getResponse();
      $response->setHeader('Location', $oidStr);
    }
  }