| | |
| | | String fName = exchange.getRequestURI().getPath(); |
| | | try { |
| | | fName = new HttpHelper().getFileName(exchange); |
| | | File fileToDeliver = new File((String) exchange |
| | | String fBase = (String) exchange |
| | | .getHttpContext().getAttributes() |
| | | .getOrDefault(ATTR_FILE_BASE, STR_EMPTY), fName); |
| | | .getOrDefault(ATTR_FILE_BASE, STR_EMPTY); |
| | | //File fileToDeliver = new File((String) exchange |
| | | // .getHttpContext().getAttributes() |
| | | // .getOrDefault(ATTR_FILE_BASE, STR_EMPTY), fName); |
| | | File fileToDeliver = new File(fBase, fName); |
| | | Headers headers = exchange.getRequestHeaders(); |
| | | if (headers.containsKey(RANGE_HEADER)) { |
| | | new PartialFileServer().serveFileParts(exchange, fileToDeliver); |