def apply()

in server/src/main/scala/com/twitter/server/handler/AbortHandler.scala [22:40]


  def apply(req: Request): Future[Response] = {
    if (req.method == Method.Post) {
      log.info(s"[${req.uri}] from ${req.remoteAddress.getHostAddress} aborting")
      background {
        Runtime.getRuntime.halt(0)
      }
      newOk("aborting\n")
    } else {
      log.info(
        s"ignoring [${req.uri}] from ${req.remoteAddress.getHostAddress}, because it is a ${req.method}, not a POST"
      )
      newResponse(
        status = Status.MethodNotAllowed,
        headers = Seq(("Allow", "POST")),
        contentType = "text/plain;charset=UTF-8",
        content = Buf.Empty
      )
    }
  }