} catch (MessagingException e) { resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
    private void retrieveUpload(HttpServletRequest req, HttpServletResponse resp, AuthToken authToken)    throws ServletException, IOException {        // if it's another server fetching an already-uploaded file, just do that        String uploadId = req.getParameter(PARAM_UPLOAD_ID);        if (uploadId == null) {            resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "missing upload id");            return;        }        try {            if (!FileUploadServlet.isLocalUpload(uploadId)) {                // wrong server; proxy to the right one...                String serverId = FileUploadServlet.getUploadServerId(uploadId);                Server server = Provisioning.getInstance().get(ServerBy.id, serverId);                proxyServletRequest(req, resp, server, null);                return;            }            Upload up = FileUploadServlet.fetchUpload(authToken.getAccountId(), uploadId, authToken.getEncoded());            if (up == null) {                resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "no such upload");                return;            }            ContentDisposition cd = new ContentDisposition(Part.INLINE);            String filename = up.getName();            cd.setParameter("filename", filename == null ? "unknown" : Mime.encodeFilename(filename));            resp.addHeader("Content-Disposition", cd.toString());            sendbackOriginalDoc(up.getInputStream(), up.getContentType(), resp);            FileUploadServlet.deleteUpload(up);        } catch (ServiceException e) {            throw new ServletException(e);        } catch (MessagingException e) {            resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());        } catch (AuthTokenException e) {            resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());        }    }