@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
getLogger().debug("Dandelion Asset servlet captured GET request {}", request.getRequestURI());
Context context = (Context) request.getAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE);
HttpHeadersConfigurer httpHeadersConfigurer = new HttpHeadersConfigurer(context);
// Get the asset content thanks to the cache key
String assetKey = context.getCacheManager().getCacheKeyFromRequest(request);
AssetType assetType = AssetType.typeOfAsset(assetKey);
// Configure response headers
httpHeadersConfigurer.configureResponseHeaders(response, assetType.getContentType());
// Send the asset's content
PrintWriter writer = response.getWriter();
writer.write(context.getCacheManager().getContent(assetKey));
// The response is explicitely closed here instead of setting a
// Content-Length header
writer.close();
}