protected void doPut()

in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsContentServlet.java [86:106]


  protected void doPut(HttpServletRequest req, HttpServletResponse rsp)
      throws ServletException, IOException {
    AnyLongObjectId id = getObjectToTransfer(req, rsp);
    if (id == null) {
      return;
    }

    if (!authorizer.verifyAuthInfo(req.getHeader(HDR_AUTHORIZATION), UPLOAD, id)) {
      sendError(
          rsp,
          HttpStatus.SC_UNAUTHORIZED,
          MessageFormat.format(
              LfsServerText.get().failedToCalcSignature, "Invalid authorization token"));
      return;
    }

    AsyncContext context = req.startAsync();
    context.setTimeout(timeout);
    req.getInputStream()
        .setReadListener(new ObjectUploadListener(repository, context, req, rsp, id));
  }