@GET
	@Path("{path:.*}")
	public Response getItem(@PathParam("path") String path, @QueryParam("download") boolean download, @QueryParam("info") boolean info) throws ContentRepositoryException, IOException {

		try {

			CollectionObject item = repo.getItem(path);

			if (item instanceof Folder) {

				return Response.ok(item, getDefaultMediaType()).build();

			} else if (item instanceof Content) {

				if (info) {
					return Response.ok(item, getDefaultMediaType()).build();
				} else {
					Content content = (Content) item;
					InputStream in = repo.openStream(content);
					ResponseBuilder response = Response.ok(in, content.getMediaType());
					if (download) {
						response.header("Content-Disposition", String.format("attachment; filename*=UTF-8''%s; filename=\"%s\"", URLEncoder.encode(item.getName(), "UTF-8"), item.getName()));
					}
					return response.build();
				}

			} else {
				throw new ContentRepositoryException("Unsupported object type. " + item);
			}

		} catch (ItemNotFoundException | FileNotFoundException e) {
			return Response.status(Status.NOT_FOUND).entity(new ServiceResult(e)).build();
		} catch (Exception e) {
			return Response.serverError().entity(new ServiceResult(e)).build();
		}
	}