public abstract class LfsProtocolServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Class and Description |
---|---|
protected static class |
LfsProtocolServlet.LfsRequest
LFS request.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CONTENTTYPE_VND_GIT_LFS_JSON |
private static org.slf4j.Logger |
LOG |
private static int |
SC_BANDWIDTH_LIMIT_EXCEEDED |
private static int |
SC_RATE_LIMIT_EXCEEDED |
private static long |
serialVersionUID |
Constructor and Description |
---|
LfsProtocolServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
protected abstract LargeFileRepository |
getLargeFileRepository(LfsProtocolServlet.LfsRequest request,
java.lang.String path,
java.lang.String auth)
Get the large file repository for the given request and path.
|
private void |
sendError(javax.servlet.http.HttpServletResponse rsp,
java.io.Writer writer,
int status,
java.lang.String message) |
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
private static final org.slf4j.Logger LOG
private static final long serialVersionUID
private static final java.lang.String CONTENTTYPE_VND_GIT_LFS_JSON
private static final int SC_RATE_LIMIT_EXCEEDED
private static final int SC_BANDWIDTH_LIMIT_EXCEEDED
protected abstract LargeFileRepository getLargeFileRepository(LfsProtocolServlet.LfsRequest request, java.lang.String path, java.lang.String auth) throws LfsException
request
- the requestpath
- the pathauth
- the Authorization HTTP headerLfsException
- implementations should throw more specific exceptions to
signal which type of error occurred:
LfsValidationError
LfsRepositoryNotFound
LfsRepositoryReadOnly
LfsRateLimitExceeded
LfsBandwidthLimitExceeded
LfsInsufficientStorage
LfsUnavailable
LfsException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
private void sendError(javax.servlet.http.HttpServletResponse rsp, java.io.Writer writer, int status, java.lang.String message)