Class BambooDefaultServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.apache.catalina.servlets.DefaultServlet
-
- com.atlassian.bamboo.plugin.servlet.BambooDefaultServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class BambooDefaultServlet extends org.apache.catalina.servlets.DefaultServlet
Default static resource serving servlet that only serves files from allowed paths or files listed in the allowed files list.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.catalina.servlets.DefaultServlet
BUFFER_SIZE, compressionFormats, contextXsltFile, debug, fileEncoding, FULL, globalXsltFile, input, listings, localXsltFile, mimeSeparation, output, readmeFile, readOnly, resources, sendfileSize, showServerInfo, sm, sortListings, sortManager, useAcceptRanges
-
-
Constructor Summary
Constructors Constructor Description BambooDefaultServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handles HTTP GET requests.-
Methods inherited from class org.apache.catalina.servlets.DefaultServlet
checkIfHeaders, checkIfMatch, checkIfModifiedSince, checkIfNoneMatch, checkIfUnmodifiedSince, checkSendfile, copy, copy, copy, copy, copyRange, copyRange, copyRange, destroy, determineMethodsAllowed, doDelete, doHead, doOptions, doPost, doPut, executePartialPut, findXsltSource, generateETag, getPathPrefix, getReadme, getRelativePath, getRelativePath, init, parseContentRange, parseRange, render, render, renderHtml, renderHtml, renderSize, renderXml, renderXml, rewriteUrl, sendNotAllowed, serveResource, service
-
-
-
-
Method Detail
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handles HTTP GET requests.This method serves files from allowed paths or files that exactly match the paths in the allowed files list. It verifies if the requested resource corresponds to a valid file and if it's located in one of the allowed paths. If the file is listed in the allowed files list, it's considered valid regardless of its path. If the real path doesn't correspond to a file, or if the requested path is not in the allowed list or the allowed files list, a 404 error is returned. In case of any IOException or ServletException, an internal server error (500) is returned.
- Overrides:
doGet
in classorg.apache.catalina.servlets.DefaultServlet
- Parameters:
request
- the HTTP requestresponse
- the HTTP response
-
-